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

Bug 1796412: cluster-reader is unable to view machine resources #149

Merged

Conversation

Danil-Grigorev
Copy link
Contributor

Added cluster-reader permissions to cluster-autoscaler cluster-role

@@ -3,6 +3,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: cluster-autoscaler-operator
labels:
Copy link
Member

Choose a reason for hiding this comment

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

this clusterRole has more permissions than the cluster reader should have.
We need to create one particular clusterRole reader for it, e.g https://github.com/openshift/cloud-credential-operator/blob/aa07b32fc3440d30bc90af636ca9ccd62e70c58a/manifests/00_clusterreader_clusterrole.yaml

hack/gen-crd.sh Outdated
@@ -3,12 +3,12 @@
set -eu

function annotate_crd() {
script='/^metadata:/a\
\ \ annotations:\
script1='/^ annotations:/a\
\ \ \ \ exclude.release.openshift.io/internal-openshift-hosted: "true"'
Copy link
Member

Choose a reason for hiding this comment

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

this does not seem related to this PR, please let's drop it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@JoelSpeed going to include the autogen fix for crds in another pr, as I agree it is out of scope

@@ -17,7 +17,6 @@ spec:
- ca
singular: clusterautoscaler
scope: Cluster
preserveUnknownFields: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this required? @enxebre I remember you introduced preserveUnknownFields: false intentionally

Copy link
Contributor

Choose a reason for hiding this comment

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

I see the comment below now

@@ -38,7 +38,6 @@ spec:
- ma
singular: machineautoscaler
scope: Namespaced
preserveUnknownFields: false
Copy link
Member

Choose a reason for hiding this comment

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

this does not seem related to this PR, please let's drop it.

BUG 1796412: cluster-reader is unable to view machine resources
metadata:
name: cluster-autoscaler-operator:cluster-reader
labels:
rbac.authorization.k8s.io/aggregate-to-cluster-reader: "true"
Copy link
Member

Choose a reason for hiding this comment

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

is there any docs we can refer here for this label?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Under already created aggregation rule this ClusterRole will be combined with cluster-reader list of permissions, according to https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles

@enxebre
Copy link
Member

enxebre commented Apr 28, 2020

/retest
/approve

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 28, 2020
@enxebre
Copy link
Member

enxebre commented Apr 29, 2020

/retest

Copy link
Contributor

@JoelSpeed JoelSpeed 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 Apr 29, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@enxebre
Copy link
Member

enxebre commented Apr 30, 2020

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@enxebre: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

/bugzilla refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@enxebre enxebre changed the title Bug 1796412 - cluster-reader is unable to view machine resources Bug 1796412: cluster-reader is unable to view machine resources Apr 30, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. label Apr 30, 2020
@openshift-ci-robot
Copy link
Contributor

@Danil-Grigorev: This pull request references Bugzilla bug 1796412, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1796412: cluster-reader is unable to view machine resources

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Apr 30, 2020
@openshift-merge-robot openshift-merge-robot merged commit 798a64b into openshift:master Apr 30, 2020
@openshift-ci-robot
Copy link
Contributor

@Danil-Grigorev: All pull requests linked via external trackers have merged: openshift/cluster-autoscaler-operator#149. Bugzilla bug 1796412 has been moved to the MODIFIED state.

In response to this:

Bug 1796412: cluster-reader is unable to view machine resources

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants