[rancher-monitoring-crd] Use global.cattle.psp.enabled field

pull/2375/head
Arvind Iyengar 2023-01-27 17:07:05 -08:00
parent faf139a0a6
commit ca676fcf6f
No known key found for this signature in database
GPG Key ID: A8DD9BFD6C811498
2 changed files with 4 additions and 2 deletions

View File

@ -10,7 +10,7 @@ rules:
resources: resources:
- customresourcedefinitions - customresourcedefinitions
verbs: ['create', 'get', 'patch', 'delete'] verbs: ['create', 'get', 'patch', 'delete']
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} {{- if .Values.global.cattle.psp.enabled }}
- apiGroups: ['policy'] - apiGroups: ['policy']
resources: ['podsecuritypolicies'] resources: ['podsecuritypolicies']
verbs: ['use'] verbs: ['use']
@ -41,7 +41,7 @@ metadata:
labels: labels:
app: {{ .Chart.Name }}-manager app: {{ .Chart.Name }}-manager
--- ---
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} {{- if .Values.global.cattle.psp.enabled }}
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodSecurityPolicy kind: PodSecurityPolicy
metadata: metadata:

View File

@ -4,6 +4,8 @@
global: global:
cattle: cattle:
psp:
enabled: false
systemDefaultRegistry: "" systemDefaultRegistry: ""
image: image: