Add scope configuration check. (#6864)

This commit is contained in:
Maikel 2021-08-05 15:23:22 +02:00 committed by GitHub
parent b1a71adb74
commit 46be93808b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 }}