helm: obc rbac aggregation to user facing roles

add view & edit ClusterRole for obc.

the roles are added to the default user facing roles
view / edit / admin respectively using k8s ClusterRole aggregation.

feature disabled for backward compatibility
and controlled with rbacAggregate.enableOBCs.

Signed-off-by: Cyril Jouve <jv.cyril@gmail.com>
(cherry picked from commit 45d897b8b3)
This commit is contained in:
Cyril Jouve authored and Mergify committed 2023-09-19 18:13:17 +00:00
1 parent 9fa0745a3b
commit 7796295a91
3 files changed
+40

No files matched your search

@@ -148,6 +148,7 @@ The following table lists the configurable parameters of the rook-operator chart
| `nodeSelector` | Kubernetes [`nodeSelector`](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) to add to the Deployment. | `{}` |
| `priorityClassName` | Set the priority class for the rook operator deployment if desired | `nil` |
| `pspEnable` | If true, create & use PSP resources | `false` |
| `rbacAggregate.enableOBCs` | If true, create a ClusterRole aggregated to [user facing roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles) for objectbucketclaims | `false` |
| `rbacEnable` | If true, create & use RBAC resources | `true` |
| `resources` | Pod resource requests & limits | `{"limits":{"cpu":"500m","memory":"512Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}` |
| `scaleDownOperator` | If true, scale down the rook operator. This is useful for administrative actions where the rook operator must be scaled down, while using gitops style tooling to deploy your helm charts. | `false` |
@@ -0,0 +1,35 @@
{{- if .Values.rbacAggregate.enableOBCs }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: rook-ceph-obc-view
labels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
rules:
- apiGroups:
- objectbucket.io
resources:
- objectbucketclaims
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: rook-ceph-obc-edit
labels:
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups:
- objectbucket.io
resources:
- objectbucketclaims
verbs:
- create
- delete
- deletecollection
- patch
- update
{{- end }}
+4
View File
@@ -55,6 +55,10 @@ logLevel: INFO
# -- If true, create & use RBAC resources
rbacEnable: true
rbacAggregate:
# -- If true, create a ClusterRole aggregated to [user facing roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles) for objectbucketclaims
enableOBCs: false
# -- If true, create & use PSP resources
pspEnable: false