[rancher-alerting-drivers] Include validate-psp-install.yaml

pull/2370/head
Arvind Iyengar 2023-01-27 12:23:13 -08:00
parent fb81b0ba41
commit 5bfa7c3de3
No known key found for this signature in database
GPG Key ID: A8DD9BFD6C811498
1 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,7 @@
#{{- if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 -}}
#{{- if .Values.global.cattle.psp.enabled }}
#{{- if not (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
#{{- fail "The target cluster does not have the PodSecurityPolicy API resource. Please disable PSPs in this chart before proceeding." -}}
#{{- end }}
#{{- end }}
#{{- end }}