Skip to content

Commit

Permalink
feat: allow rbac to pe externally provisioned (#1005)
Browse files Browse the repository at this point in the history
* feat: allow rbac to pe externally provisioned

Signed-off-by: laurentiusoica <[email protected]>

* fix: add new parameter in docs

Signed-off-by: laurentiusoica <[email protected]>

---------

Signed-off-by: laurentiusoica <[email protected]>
Co-authored-by: laurentiusoica <[email protected]>
  • Loading branch information
lsoica and laurentiusoica authored Jun 22, 2024
1 parent dd4e8e1 commit f1080f5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/redis-operator/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ kubectl create secret tls <webhook-server-cert> --key tls.key --cert tls.crt -n
| `resources.requests.cpu` | CPU request | `500m` |
| `resources.requests.memory` | Memory request | `500Mi` |
| `replicas` | Number of replicas | `1` |
| `rbac.enabled` | Feature flag for rbac resources | `true` |
| `serviceAccountName` | Service account name | `redis-operator` |
| `serviceAccount.automountServiceAccountToken` | Automount service account token | `true` |
| `certificate.name` | Certificate name | `serving-cert` |
Expand Down
2 changes: 2 additions & 0 deletions charts/redis-operator/templates/role-binding.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.rbac.enabled }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand All @@ -19,3 +20,4 @@ roleRef:
kind: ClusterRole
name: {{ .Values.redisOperator.name }}
apiGroup: rbac.authorization.k8s.io
{{- end }}
2 changes: 2 additions & 0 deletions charts/redis-operator/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.rbac.enabled }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down Expand Up @@ -124,3 +125,4 @@ rules:
- patch
- update
- watch
{{- end }}
2 changes: 2 additions & 0 deletions charts/redis-operator/templates/service-account.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.rbac.enabled }}
---
apiVersion: v1
kind: ServiceAccount
Expand All @@ -13,3 +14,4 @@ metadata:
app.kubernetes.io/version : {{ .Chart.AppVersion }}
app.kubernetes.io/component: service-account
app.kubernetes.io/part-of : {{ .Release.Name }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/redis-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ resources:

replicas: 1

rbac:
enabled: true
serviceAccountName: redis-operator

serviceAccount:
Expand Down

0 comments on commit f1080f5

Please sign in to comment.