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

RBAC for console backend to request openshift-config-managed configmaps #366

Merged
merged 1 commit into from Jan 8, 2020

Conversation

jhadvig
Copy link
Member

@jhadvig jhadvig commented Jan 7, 2020

Adding:

  • Role for GETting ConfigMaps from the openshift-config-managed namespace. Haven't found any existing Role on the cluster that would be suitable.
  • ServiceAccount for the console, since there are only default ServiceAccounts in the openshift-console namespace
  • RoleBinding - for binding the added Role and ServiceAccount

Story: https://issues.redhat.com/browse/CONSOLE-1993

/assign @benjaminapetersen

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 7, 2020
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: managed-configmap-reader
Copy link
Contributor

Choose a reason for hiding this comment

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

So currently we have:

oc get role -n openshift-config-managed
NAME               AGE
console-operator   28h
console-public     28h
machine-approver   28h

For this reason I'm inclined to name it console-configmap-reader. Since its in openshift-config-managed namespace. That would give us:

oc get role -n openshift-config-managed
NAME                              AGE
console-configmap-reader          28h
console-operator                  28h
console-public                    28h
machine-approver                  28h

Copy link
Contributor

Choose a reason for hiding this comment

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

We did speak about console-public being somewhat "different" as its more for other components being able to get the console-public configmap so those components can oc get configmap console-public -n openshift-config-managed --template '{{.data.consoleURL}}' and use the console url value. This is probably fine.

@jhadvig
Copy link
Member Author

jhadvig commented Jan 8, 2020

@benjaminapetersen PR updated, set the console podSpec to use the console ServiceAccount. Tokens are mounted automatically.

@benjaminapetersen
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 8, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benjaminapetersen, jhadvig

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 Jan 8, 2020
@openshift-merge-robot openshift-merge-robot merged commit 402b1ab into openshift:master Jan 8, 2020
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. 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.

None yet

4 participants