-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
#1 support multiple namespaces - we just need daemon to support it #2
base: master
Are you sure you want to change the base?
Conversation
This is good. But the actual codebase is not accepting multiple namespaces right. With the current codebase, i guess we need to deploy one pod per namespace. But I like the idea of daemon sets. In that case, the codebase should be able to pull and scan across all the namespace. That needs to changed. |
Well - this would not entail running as a daemonset (if thats what you meant) - as those run one instance per physical node (which I see no use for here) - it merely needs the go code, to accept an array of "namespaces" - and then iterate over those and get pod resources - instead of only doing it for "current namespace" - or "clusterwide".. We'd rather not run one instance of CRE per namespace (more pods to monitor, scrape etc.) and keep our "management" namespace for each project and have monitoring components live in there. |
Then it is good I believe. Can I go ahead and merge this? |
As I understand it - the GO code does not have any way, I can tell it which namespaces to "list pods resources" from ? |
I added useExistingRole support - so one can seperate role creation from the rest (needed in some RHEL openshift setups - where RBAC (but not rolebinding and SA creation) must be done by admin). Did you have a look at wether or not it would be easy to add multiple namespace support to the Go code ? and then just "do what it does now" - in a loop over those - if that env var is set ? If you agree with the approach, I'll gladly update Helm chart to expose that env var if namespaces is given as value. |
Hi @KlavsKlavsen apologies for the delayed response. I will change the Go code this weekend. |
Fixes #1 - This enables specifying multiple namespaces, so when running in local mode - it will simply add rolebinding to central SA - just need to know what to add to deployment, so daemon knows which namespaces to try and get metrics from (it currently just pulls from its own namespace).