-
Notifications
You must be signed in to change notification settings - Fork 7
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 the permissions in config/rbac/bases/operator/role.yaml #155
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGHT with none blocking comment
- scheduling.k8s.io | ||
resources: | ||
- priorityclasses | ||
verbs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I normally add watch verb to the list below. Yet the code that checks storage class is within webook, so it might not have proper client cache configured
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should be generated by kubebuilder when you run task k8s:manifests
(or something similar). You can affect how that file is generated by adding kubebuilder markers/directives above the controller. There should be a big block that exists already and just needs to have priorityclasses add. Can you add it there and then regenerate this file?
Let me try. |
Added the marker. I only added it for ClusterRole. I don't think we need to add it to Role. Let me know if otherwise. |
Ah, sorry this should be added above the controller that's actually using those permissions redpanda-operator/src/go/k8s/internal/controller/redpanda/cluster_controller.go Lines 82 to 99 in dd0c3ad
|
No problem. Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Related to #154,
config/rbac/bases/operator/role.yaml
is actually pulled by Cloud, need to add the permissions to it.