mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
🎨 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:
@@ -19,11 +19,10 @@ metadata:
|
|||||||
rules:
|
rules:
|
||||||
- apiGroups: ["*"]
|
- apiGroups: ["*"]
|
||||||
resources: ["*"]
|
resources: ["*"]
|
||||||
verbs: ["get", "list", "watch"]
|
|
||||||
{{- if .Values.dashboard.allowWriteActions }}
|
{{- if .Values.dashboard.allowWriteActions }}
|
||||||
- apiGroups: ["*"]
|
|
||||||
resources: ["*"]
|
|
||||||
verbs: ["get", "list", "watch", "create", "delete", "patch", "update"]
|
verbs: ["get", "list", "watch", "create", "delete", "patch", "update"]
|
||||||
|
{{- else }}
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
|||||||
Reference in New Issue
Block a user