Skip to content

Add disclaimers regarding Event lifetime#5531

Open
dabico wants to merge 3 commits into
kubernetes-sigs:mainfrom
dabico:events
Open

Add disclaimers regarding Event lifetime#5531
dabico wants to merge 3 commits into
kubernetes-sigs:mainfrom
dabico:events

Conversation

@dabico
Copy link
Copy Markdown
Contributor

@dabico dabico commented May 10, 2026

Summary

Add a small disclaimer tooltip next to the title of "Events" tables regarding Event resource lifetime in Kubernetes. Helpful to teach newbie users about Event retention, and a good reminder even for more veteran users.

Changes

  • Updated "Events" section in resource details to include the disclaimer.
  • Updated "Events" section in "Cluster" page to include the disclaimer.
  • Added translations.

Steps to Test

  1. Launch locally with Minikube:

    $ minikube start \
      --container-runtime=containerd \
      --docker-opt containerd=/var/run/containerd/containerd.sock \
      --kubernetes-version=v1.35.0
    $ tmux new-session -d -s frontend 'make frontend-install run-frontend'
    $ tmux new-session -d -s backend 'make backend run-backend'
  2. Open Headlamp UI in the browser.

  3. Navigate to the Clusters page and hover over the information icon to view.

  4. Under Workloads, select any resource to view its details, hover over the information icon to view.

Screenshots

events-cluster events-resource

Notes for the Reviewer

  • Translations were only added for languages that I know and could verify the authenticity of the translation.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 10, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dabico
Once this PR has been reviewed and has the lgtm label, please assign yolossn for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 10, 2026
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 10, 2026
@illume illume requested a review from Copilot May 10, 2026 17:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a brief “events are ephemeral” disclaimer under Kubernetes Events tables to help users understand Event retention behavior across the UI.

Changes:

  • Add an info-note below the object details Events table (ObjectEventList) and the Cluster Overview Events section.
  • Introduce a new i18n string for the disclaimer and update locale files.
  • Update Storybook storyshot snapshots across affected details views.

Reviewed changes

Copilot reviewed 68 out of 68 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
frontend/src/components/common/ObjectEventList.tsx Renders an info disclaimer under the per-object Events table.
frontend/src/components/cluster/Overview.tsx Renders an info disclaimer under the Cluster Overview Events table.
frontend/src/i18n/locales/en/translation.json Adds the new disclaimer string in English.
frontend/src/i18n/locales/de/translation.json Adds German translation entry for the new disclaimer string.
frontend/src/i18n/locales/it/translation.json Adds Italian translation entry for the new disclaimer string.
frontend/src/i18n/locales/es/translation.json Adds placeholder entry for the new disclaimer string.
frontend/src/i18n/locales/fr/translation.json Adds placeholder entry for the new disclaimer string.
frontend/src/i18n/locales/hi/translation.json Adds placeholder entry for the new disclaimer string.
frontend/src/i18n/locales/ja/translation.json Adds placeholder entry for the new disclaimer string.
frontend/src/i18n/locales/ko/translation.json Adds placeholder entry for the new disclaimer string.
frontend/src/i18n/locales/pt/translation.json Adds placeholder entry for the new disclaimer string.
frontend/src/i18n/locales/ta/translation.json Adds placeholder entry for the new disclaimer string.
frontend/src/i18n/locales/zh/translation.json Adds placeholder entry for the new disclaimer string.
frontend/src/i18n/locales/zh-tw/translation.json Adds placeholder entry for the new disclaimer string.
frontend/src/components/common/snapshots/ObjectEventList.WithEvents.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/common/snapshots/ObjectEventList.NoEventsForObject.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/common/snapshots/ObjectEventList.ErrorFetching.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/cluster/snapshots/Overview.Events.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/cluster/snapshots/Overview.ErrorState.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/cluster/snapshots/Overview.EmptyState.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/webhookconfiguration/snapshots/ValidatingWebhookConfigDetails.WithURL.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/webhookconfiguration/snapshots/ValidatingWebhookConfigDetails.WithService.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/webhookconfiguration/snapshots/MutatingWebhookConfigDetails.WithURL.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/webhookconfiguration/snapshots/MutatingWebhookConfigDetails.WithService.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/verticalPodAutoscaler/snapshots/VPADetails.Default.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/storage/snapshots/VolumeDetails.Base.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/storage/snapshots/ClassDetails.Base.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/storage/snapshots/ClaimDetails.Base.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/statefulset/snapshots/Details.WithOnDeleteStrategy.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/statefulset/snapshots/Details.WithMultipleContainers.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/statefulset/snapshots/Details.WithComplexSelector.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/statefulset/snapshots/Details.Default.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/service/snapshots/ServiceDetails.WithA8ROwnerOnly.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/service/snapshots/ServiceDetails.WithA8RAnnotations.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/service/snapshots/ServiceDetails.ErrorWithEndpoints.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/service/snapshots/ServiceDetails.Default.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/secret/snapshots/Details.WithBase.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/secret/snapshots/Details.Empty.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/runtimeClass/snapshots/Details.Base.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/resourceQuota/snapshots/resourceQuotaDetails.Default.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/priorityClass/snapshots/priorityClassDetails.Default.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/podDisruptionBudget/snapshots/pdbDetails.Default.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/networkpolicy/snapshots/Details.Default.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/namespace/snapshots/NamespaceDetails.Active.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/limitRange/snapshots/Details.LimitRangeDetail.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/lease/snapshots/Details.LeaseDetail.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/ingress/snapshots/Details.WithWildcardTLS.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/ingress/snapshots/Details.WithTLS.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/ingress/snapshots/Details.WithResource.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/ingress/snapshots/ClassDetails.WithDefault.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/ingress/snapshots/ClassDetails.Basic.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/horizontalPodAutoscaler/snapshots/HPADetails.Default.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/gateway/snapshots/ReferenceGrantDetails.Basic.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/gateway/snapshots/HTTPRouteDetails.Empty.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/gateway/snapshots/HTTPRouteDetails.Basic.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/gateway/snapshots/GRPCRouteDetails.Basic.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/gateway/snapshots/GatewayDetails.Basic.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/gateway/snapshots/ClassDetails.Basic.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/gateway/snapshots/BackendTrafficPolicyDetails.Basic.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/gateway/snapshots/BackendTLSPolicyDetails.Basic.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/endpointSlices/snapshots/EndpointSliceDetails.Default.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/endpoints/snapshots/EndpointDetails.Default.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/cronjob/snapshots/CronJobDetails.EveryMinute.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/cronjob/snapshots/CronJobDetails.EveryAst.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/crd/snapshots/CustomResourceDetails.NoError.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/crd/snapshots/CustomResourceDefinition.Details.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/configmap/snapshots/Details.WithBase.stories.storyshot Updates snapshot to include the disclaimer.
frontend/src/components/configmap/snapshots/Details.Empty.stories.storyshot Updates snapshot to include the disclaimer.

Comment thread frontend/src/components/common/ObjectEventList.tsx Outdated
Comment thread frontend/src/components/cluster/Overview.tsx Outdated
@dabico
Copy link
Copy Markdown
Contributor Author

dabico commented May 10, 2026

@copilot's comments are technically correct, but one should keep the following in mind: most managed Kubernetes services (AKS, EKS, GKE, etc.) don't offer options for configuring the kube-apiserver on the control plane (probably has something to do with them all providing more performant and robust log storage). The wording in my changes is indeed absolute, but its suggestions don't look that much better to me. At the same time, I wonder how many users run self-managed clusters, let alone change the event retention. If you have any suggestions about the wording, please let me know, and I'll change it.

@yolossn
Copy link
Copy Markdown
Contributor

yolossn commented May 11, 2026

@dabico I think having a ℹ️ icon next to events Header and showing the text as tooltip on hover will be a better UX. I think its better to mention that the 1hr timelimit can vary based on Users Cluster config.

Copy link
Copy Markdown
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR.

The open review comments from Copilot still need attention — can you have a look? Once addressed, please mark them as resolved.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 15, 2026
Copy link
Copy Markdown
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution.

This PR has git conflicts — could you resolve them?

How to resolve conflicts

Rebase or merge the latest main into your branch, resolve the conflicts, and push the updated branch.

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 17, 2026
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 17, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 17, 2026
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels May 17, 2026
@dabico
Copy link
Copy Markdown
Contributor Author

dabico commented May 18, 2026

@dabico I think having a ℹ️ icon next to events Header and showing the text as tooltip on hover will be a better UX. I think its better to mention that the 1hr timelimit can vary based on Users Cluster config.

@yolossn I've implemented the suggestions. You can see what it looks like in the updated issue description. @illume I've rebased off of main. Please let me know what you both think.

@illume illume requested a review from Copilot May 18, 2026 07:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 69 out of 69 changed files in this pull request and generated 3 comments.

Comment on lines +107 to +136
<SectionBox
title={t('glossary|Events')}
headerProps={{
noPadding: false,
headerStyle: 'subsection',
titleSideActions: [
<LightTooltip
key="event-lifetime-info"
title={t(
"translation|Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
)}
interactive
>
<Box
component="span"
sx={{
display: 'inline-flex',
alignItems: 'center',
verticalAlign: 'middle',
fontSize: '1.75rem',
lineHeight: 0,
mr: 1,
}}
>
<Icon icon="mdi:information-outline" />
</Box>
</LightTooltip>,
],
}}
>
Comment on lines +178 to +198
<LightTooltip
key="event-lifetime-info"
title={t(
"translation|Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration."
)}
interactive
>
<Box
component="span"
sx={{
display: 'inline-flex',
alignItems: 'center',
verticalAlign: 'middle',
fontSize: '1.75rem',
lineHeight: 0,
mr: 1,
}}
>
<Icon icon="mdi:information-outline" />
</Box>
</LightTooltip>,
"Reason": "Reason",
"Count": "Count",
"Last Seen": "Last Seen",
"Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration.": "Kubernetes events have a lifetime of 1 hour by default. This duration may vary depending on your cluster's configuration.",
Copy link
Copy Markdown
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution.

There are some open Copilot review comments — could you take a look at them? Please mark each one as resolved once you've addressed it.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 20, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants