k8s: allow limiting k8s instance to a particular namespace
By default pyrra-k8s attempts to read ServiceLevelObjectives on cluster scope. We might want to scope these to a particular namespace, so that a) multiple pyrras could be deployed b) each instance would require less privileges
Nice, very cool contribution!
We should probably support having a flag that takes multiple namespaces, much like the Prometheus Operator has it: https://github.com/prometheus-operator/prometheus-operator/blob/2c81b0cf6a5673e08057499a08ddce396b19dda4/cmd/operator/main.go#L186
Now, I'm happy merging this for now and then add support for multiple namespaces in a follow up PR!? What do you think?
Right, I'd follow prometheus-operator here.
I wonder if we can start with cluster scope - and fall back to a single namespace if auth error is received? That would cover 95% of cases. Multiple namespaces can be provided with a flag
Very helpful feature, any chance of this getting merged?
Are you still interested in finishing this PR @vrutkovs?
I'm not too familiar with prometheus-operator and sadly don't have much time to implement a more extensive change :(
I don't mind landing a change to support single namespace (read "rebase until it passes tests")