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

Search for k8s containers by name, not position in array. #2983

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

umanwizard
Copy link
Contributor

It is not necessarily true that the items in ContainerStatuses are in the same order as those in Spec.Containers, so the old logic was wrong.

container names are unique within a pod, so we can find the container in the spec for a given ID based on its name.

It is not necessarily true that the items in ContainerStatuses are in
the same order as those in Spec.Containers, so the old logic was
wrong.

container names _are_ unique within a pod, so we can find the container in
the spec for a given ID based on its name.
@umanwizard umanwizard requested a review from brancz September 13, 2024 16:43
Copy link
Member

@brancz brancz left a comment

Choose a reason for hiding this comment

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

Nice find!!

@umanwizard umanwizard merged commit 1c8646b into parca-dev:main Sep 13, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants