-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add ability to set multiple namespaces to search for secrets and configMaps #119
Add ability to set multiple namespaces to search for secrets and configMaps #119
Conversation
I really like this change, but I'd like to keep it backwards compatible by preserving the old CLI params. Perhaps just concatenate any namespaces specified in both |
Done.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of small suggestions, but it's looking good.
One weird consequence of this PR is that you can no longer pass an empty string ""
to the config map or secret checker. I'm honestly not sure what that does. If it searches all namespaces and its a feature that people relied on we need to make sure that we preserve it.
Maybe if getSanitizedNamespaceList()
is about to return an empty slice then it returns a slice with just the empty string instead?
Also I think the StartChecking()
methods should log an error, raise a metric and bail if an empty slice is passed in since they won't do anything.
docs/deploy.md
Outdated
Kubernetes namespace to list secrets. | ||
-secrets-list-of-namespaces string | ||
Kubernetes list of namespaces to search for secrets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer the old name -secrets-namespaces
and -configmaps-namespaces
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These names are too similar and can be confused. But if you want, I can return the old names.
Change name of variable
Co-authored-by: Joe Elliott <joe.elliott@grafana.com>
Co-authored-by: Joe Elliott <joe.elliott@grafana.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Thank you!
Hello but nothing works. it gives results only from the last namesapce I of the list any fix for that? Thank you |
Add ability to set multiple namespaces to search for secrets and configMaps.
Add new parameters:
This parameters allow to set list of namespaces to search for secrets/configMaps.
Example,
Open Issue - #73