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

Pid2Pod Fix #45

Merged
merged 3 commits into from
Jan 12, 2025
Merged

Pid2Pod Fix #45

merged 3 commits into from
Jan 12, 2025

Conversation

regevnoam1
Copy link
Contributor

@regevnoam1 regevnoam1 commented Dec 29, 2024

I did 2 Changes in the LookUpPod Script cause the execure of ./kubeletctl pid2pod didn't return me the desired outcome.

Change 1:
In the LookupContainerID method.
Change from FindStringSubmatch to FindAllStringSubmatch, this method captures all occurrences of the regex pattern in the text, which is crucial for environments where a process might be associated with multiple containers.

Change 2:
The script assumes there is only one container ID associated with each PID, which might not be accurate in environments where processes can appear in more than one container's.

@g3rzi g3rzi merged commit db66e26 into cyberark:master Jan 12, 2025
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