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

k8s: allow limiting k8s instance to a particular namespace #29

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vrutkovs
Copy link
Contributor

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

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
@metalmatze
Copy link
Member

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?

@vrutkovs
Copy link
Contributor Author

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

@ghost
Copy link

ghost commented Mar 7, 2022

Very helpful feature, any chance of this getting merged?

@metalmatze
Copy link
Member

Are you still interested in finishing this PR @vrutkovs?

@vrutkovs
Copy link
Contributor Author

vrutkovs commented Mar 9, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants