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

View File

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