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

Grant namespace list to global operators #764

Merged

Conversation

ecordell
Copy link
Member

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

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.
@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 19, 2019
@@ -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{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

Copy link
Member

@alecmerdler alecmerdler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2019
@openshift-ci-robot
Copy link
Collaborator

[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:
  • OWNERS [alecmerdler,ecordell]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ecordell
Copy link
Member Author

/retest

@ecordell
Copy link
Member Author

ecordell commented Mar 19, 2019 via email

@ecordell
Copy link
Member Author

ecordell commented Mar 19, 2019 via email

@ecordell
Copy link
Member Author

/retest

@ecordell ecordell added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 19, 2019
@ecordell
Copy link
Member Author

/retest

@openshift-merge-robot openshift-merge-robot merged commit 22691a7 into operator-framework:master Mar 19, 2019
@ecordell ecordell deleted the ns-list-for-all branch March 20, 2019 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants