Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container age is same for all containers in pod #2877

Open
ryanbrainard opened this issue Sep 12, 2024 · 0 comments
Open

Container age is same for all containers in pod #2877

ryanbrainard opened this issue Sep 12, 2024 · 0 comments

Comments

@ryanbrainard
Copy link




Describe the bug
The AGE column for Containers is calculated from po.GetCreationTimestamp(), which means it is the same for all containers in a pod since it's actually showing the pod's age instead of the containers' ages.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any pod with multiple containers. Even better if they have init containers, which are more likely to have different start times.
  2. View the AGE column
  3. All the containers will have the same age. Compare this with the YAML where it shows they actually have different start times in the InitContainerStatuses and ContainerStatuses.

Expected behavior
Instead, I think AGW should be calculated from the po.Status.ContainerStatuses[index].State.Running.StartedAt or po.Status.ContainerStatuses[index].State.Terminated.StartedAt, and null when po.Status.ContainerStatuses[index].State.Waiting != nil`.

For init containers, it should useInitContainerStatuses and limit the age to FinishedAt in the case of a terminated init container.

Screenshots
Current Behavior:

image

Desired Behavior:

image

Versions (please complete the following information):

  • OS: OSX
  • K9s Rev: v0.32.5
  • K8s Rev: v1.28.12-eks-2f46c53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant