diff --git a/packages/rancher-gatekeeper/generated-changes/patch/values.yaml.patch b/packages/rancher-gatekeeper/generated-changes/patch/values.yaml.patch index d4b924c1a..7b024d104 100644 --- a/packages/rancher-gatekeeper/generated-changes/patch/values.yaml.patch +++ b/packages/rancher-gatekeeper/generated-changes/patch/values.yaml.patch @@ -20,7 +20,7 @@ tag: v3.10.0 pullPolicy: IfNotPresent pullSecrets: [] -@@ -80,8 +80,8 @@ +@@ -80,7 +80,7 @@ probeWebhook: enabled: true image: @@ -29,7 +29,6 @@ tag: 7.83.1 pullPolicy: IfNotPresent pullSecrets: [] - waitTimeout: 60 @@ -104,7 +104,7 @@ extraRules: [] enabled: false diff --git a/packages/rancher-gatekeeper/templates/crd-template/templates/rbac.yaml b/packages/rancher-gatekeeper/templates/crd-template/templates/rbac.yaml index bdda1ddad..f8c3644fc 100644 --- a/packages/rancher-gatekeeper/templates/crd-template/templates/rbac.yaml +++ b/packages/rancher-gatekeeper/templates/crd-template/templates/rbac.yaml @@ -10,11 +10,13 @@ rules: resources: - customresourcedefinitions verbs: ['create', 'get', 'patch', 'delete'] +{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} - apiGroups: ['policy'] resources: ['podsecuritypolicies'] verbs: ['use'] resourceNames: - {{ .Chart.Name }}-manager +{{- end }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -39,6 +41,7 @@ metadata: labels: app: {{ .Chart.Name }}-manager --- +{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: @@ -70,3 +73,4 @@ spec: volumes: - 'configMap' - 'secret' +{{- end }}