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

Wrongly marks a configmap as unused #385

Closed
almilaneze opened this issue Dec 2, 2024 · 2 comments · Fixed by #388
Closed

Wrongly marks a configmap as unused #385

almilaneze opened this issue Dec 2, 2024 · 2 comments · Fixed by #388
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@almilaneze
Copy link
Contributor

Describe the bug
When a configmap is used to provide environment variables to a initContainer (envFrom) this is not evaluated. As a result such a cm is marked as not used and if it is removed then on a new pod creation (for whatever reasons) it will fail as the corresponding configmap for providing environment vars to the initContainer will be missing.

To Reproduce
Steps to reproduce the behavior:

  • have a pod with initContainer that gets env vars from a configmap
  • check for unused configmaps in the namespace where the above pod is running

Expected behavior
Additional validation for initContainer's 'envFrom' section will be needed to check if it contains 'ConfigMapRef' section.

Screenshots

OS version, architecture and kor version
x86_64 GNU/Linux
Kor version: 0.1.14

Additional context

@yonahd yonahd added bug Something isn't working good first issue Good for newcomers labels Dec 2, 2024
@almilaneze
Copy link
Contributor Author

Hi Yonah, I can take care of fixing this one.

@yonahd
Copy link
Owner

yonahd commented Dec 3, 2024

Hi Yonah, I can take care of fixing this one.

Go for it.
Please make this fix also for the secrets and add a test for this case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants