-
Notifications
You must be signed in to change notification settings - Fork 383
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
fix scope of generated (Cluster)Role(Binding)s #1271
Conversation
Now it'll take both `watchNamespaces` and `namespaceScope` into consideration, for determining if (Cluster)Role(Binding)s are supposed to be deployed. - If `namespaceScope` is set, but `watchNamespaces` is not, it will default `watchNamespaces` to `.Release.Namespace` - If `watchNamespaces` is set, `namespaceScope` is automatically assumed, even if not explitly set - If `watchNamespaces` contains multiple, comma separated, namespaces, `Role(Binding)`s are generated for each namespace
Thanks 🙏 will this correct the OLM manifests or is this change only affecting helm based installs? |
This only affects the helm installation @ctml91 . |
My head hurts from reading all the helm chart templates, but the output looks good :). The only issue I see if a user already has created the rbac settings for the operator with the exact same name. If that is the case, they will get an error when they try to update the helm chart. Maybe add the namespace name as a prefix or something like that. What do you think @tamcore ? |
FYI @smuda , good for you to know about. |
@NissesSenap not sure if i can follow 😅 but i guess it could make sense to prefix the generated resource names with the |
I changed my mind about the rbac names, sorry about that. |
This should address the issue raised by @ctml91 via comment in my previous PR: #1262 (comment)
Now it'll take both
watchNamespaces
andnamespaceScope
into consideration, for determining if(Cluster)Role(Binding)
s are supposed to be deployed.namespaceScope
is set, butwatchNamespaces
is not, it will defaultwatchNamespaces
to.Release.Namespace
watchNamespaces
is set,namespaceScope
is automatically assumed, even if not explitly setwatchNamespaces
contains multiple, comma separated, namespaces,Role(Binding)
s are generated for each namespaceCase 1:
grafana-operator
namespace, but explitly watchinggrafana1,grafana2
Case 2
namespaceScope
Case 3
Case 4: