🎨 Remove Superfluous Rule from helm-dashboard ClusterRole (#187)

A superfluous rule is added to the ClusterRole upon creation,
when the dashboard.allowWriteActions value is set to true.
This commit will ensure that only a single rule is created within
the ClusterRole, regardless of whether the dashboard.allowWriteActions
value is enabled or not.
The verbs within this rule will update accordingly.
This commit is contained in:
Todd Turner
2023-01-13 20:56:48 +10:00
committed by GitHub
parent 83e4348ace
commit f3c66ecf03

View File

@@ -19,11 +19,10 @@ metadata:
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["get", "list", "watch"]
{{- if .Values.dashboard.allowWriteActions }}
- apiGroups: ["*"]
resources: ["*"]
verbs: ["get", "list", "watch", "create", "delete", "patch", "update"]
{{- else }}
verbs: ["get", "list", "watch"]
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1