-
Notifications
You must be signed in to change notification settings - Fork 10
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
v2: correct and test controller RBAC #301
Conversation
6b2498a
to
f07f723
Compare
role := roles[1].(*rbacv1.Role) | ||
clusterRole := roles[0].(*rbacv1.ClusterRole) | ||
|
||
for _, typ := range redpandachart.Types() { |
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.
Do we have this same test equivalent in the helm chart-defined role? Seems like it'd be nice since we're relying on the generated role.yaml
in our tests here, but the RBAC rules are actually a part of the operator chart currently.
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.
There's a WIP PR from Rafal that tests based off the operator's role.yaml
: redpanda-data/helm-charts#1593 that I've been patching up to work with these updates. It's a bit less than ideal because the dependency is external to the repo but it'll work for now :/
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.
Updated PR here: redpanda-data/helm-charts#1595
4ef451c
to
61ccdd8
Compare
|
61ccdd8
to
80f144c
Compare
Prior to this commit the declared permissions for the RedpandaReconciler had become out of date. This went unnoticed due to tests utilizing admin permissions or the inflated permissions required for executing `rpk debug bundle`. This commit corrects the permission declaration of the RedpandaReconciler, updates its tests to use the ClusterRole and Role generated by controller-gen, and adds a test to statically assert the correctness of the permissions.
80f144c
to
616a923
Compare
Prior to this commit the declared permissions for the RedpandaReconciler had become out of date. This went unnoticed due to tests utilizing admin permissions or the inflated permissions required for executing
rpk debug bundle
.This commit corrects the permission declaration of the RedpandaReconciler, updates its tests to use the ClusterRole and Role generated by controller-gen, and adds a test to statically assert the correctness of the permissions.