pyrra icon indicating copy to clipboard operation
pyrra copied to clipboard

k8s: allow limiting k8s instance to a particular namespace

Open vrutkovs opened this issue 4 years ago • 5 comments

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

vrutkovs avatar Sep 14 '21 13:09 vrutkovs

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?

metalmatze avatar Sep 14 '21 16:09 metalmatze

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

vrutkovs avatar Sep 14 '21 16:09 vrutkovs

Very helpful feature, any chance of this getting merged?

ghost avatar Mar 07 '22 10:03 ghost

Are you still interested in finishing this PR @vrutkovs?

metalmatze avatar Mar 09 '22 15:03 metalmatze

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")

vrutkovs avatar Mar 09 '22 15:03 vrutkovs