-
Notifications
You must be signed in to change notification settings - Fork 544
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
Grant namespace list to global operators #764
Grant namespace list to global operators #764
Conversation
to get namespace list permissions
namespaces are now granted namespace view roles (get/list/watch) operators that support both single and all namespace installation should request the smallest scope of permissions they need. A single-namespace operator shouldn't require any cluster-level permissions. When placing it into an operatorgroup selecting all namespaces, it will need list and watch on namespaces.
@@ -1279,6 +1284,21 @@ func TestCSVCopyWatchingAllNamespaces(t *testing.T) { | |||
require.EqualValues(t, "rbac.authorization.k8s.io", fetchedRoleBinding.RoleRef.APIGroup) | |||
require.EqualValues(t, "ClusterRole", fetchedRoleBinding.RoleRef.Kind) | |||
|
|||
t.Log("ensure operator was granted namespace list permission") | |||
res, err := c.KubernetesInterface().AuthorizationV1().SubjectAccessReviews().Create(&v1.SubjectAccessReview{ |
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.
Cool!
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alecmerdler, ecordell The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
/retest |
/retest |
Operators that support both single and all namespace installation should
request the smallest scope of permissions they need. A single-namespace
operator shouldn't require any cluster-level permissions. When placing
it into an operatorgroup selecting all namespaces, it will need list
and watch on namespaces