-
Notifications
You must be signed in to change notification settings - Fork 558
add expanded cluster-reader role rules #112
add expanded cluster-reader role rules #112
Conversation
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.
Is it possible to consolidate some of these roles? I was following the messages on the forum, and was wondering if this could be reduced in any way.
Lines of code isn't being enforced, but minimizing rbac for each operator is preferable.
- "" | ||
- route.openshift.io | ||
resources: | ||
- routes/status |
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.
Can this role be consolidated with the role above? They have the same api group and verbs
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.
/me wishes the output of oc get clusterrole cluster-reader -o yaml
would be already condensed . . .
you mean, something like this?
- apiGroups:
- ""
- route.openshift.io
resources:
- routes
- routes/status
verbs:
- get
- list
- watch
?
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.
Yeah just like that. That's effectively the same role as far as I can tell.
139ce43
to
13e38a5
Compare
This is what I did to get the list of `cluster-reader` rules to add to the `clusterPermissions`: - on a current cluster, `oc get clusterrole cluster-reader -o yaml` - edit the file so that it contained just the list of rules - run through a python script to "de-dup" the rules For example, change this: ```yaml - apiGroups: - "" - route.openshift.io resources: - routes/status verbs: - get - list - watch - apiGroups: - "" - route.openshift.io resources: - routes verbs: - get - list - watch ``` to this ``` - apiGroups: - "" - route.openshift.io resources: - routes - routes/status verbs: - get - list - watch ``` There were several such cases in the cluster-reader role definition.
13e38a5
to
252f4f2
Compare
note - not the same as - apiGroups:
- build.openshift.io
resources:
- jenkins
verbs:
- view because it failed verb validation - |
/hold cluster reader changes every release, and is an aggregated cluster role that can be expanded based on other installed components. Any attempt to copy it is brittle. |
ok - so what are our alternatives?
Not sure how long either of these will take, and in the meantime, logging is blocked due to https://bugzilla.redhat.com/show_bug.cgi?id=1680504 . . . |
That seems like the best approach. |
closing in favor of openshift/cluster-logging-operator#106 |
the cluster-logging-operator needs the cluster-reader clusterrole
rights - we cannot add a
roleRef: cluster-reader
so add thefull list of rules from
oc get clusterrole cluster-reader
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1680504