Add scope configuration check. (#6864)
This commit is contained in:
parent
b1a71adb74
commit
46be93808b
1 changed files with 9 additions and 1 deletions
|
@ -1,4 +1,10 @@
|
||||||
{{- if and .Values.rbac.create (not .Values.rbac.scope) -}}
|
{{- if .Values.rbac.create }}
|
||||||
|
|
||||||
|
{{- if and .Values.rbac.scope (not .Values.controller.scope.enabled) -}}
|
||||||
|
{{ required "Invalid configuration: 'rbac.scope' should be equal to 'controller.scope.enabled' (true/false)." (index (dict) ".") }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if not .Values.rbac.scope -}}
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -73,3 +79,5 @@ rules:
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue