mirror of https://git.rancher.io/charts
add condition to check for PSP capability in rancher-gatekeeper-crd
parent
2c1e0bd6bf
commit
5d1f34e8dd
|
@ -20,7 +20,7 @@
|
||||||
tag: v3.10.0
|
tag: v3.10.0
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
pullSecrets: []
|
pullSecrets: []
|
||||||
@@ -80,8 +80,8 @@
|
@@ -80,7 +80,7 @@
|
||||||
probeWebhook:
|
probeWebhook:
|
||||||
enabled: true
|
enabled: true
|
||||||
image:
|
image:
|
||||||
|
@ -29,7 +29,6 @@
|
||||||
tag: 7.83.1
|
tag: 7.83.1
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
pullSecrets: []
|
pullSecrets: []
|
||||||
waitTimeout: 60
|
|
||||||
@@ -104,7 +104,7 @@
|
@@ -104,7 +104,7 @@
|
||||||
extraRules: []
|
extraRules: []
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
|
@ -10,11 +10,13 @@ rules:
|
||||||
resources:
|
resources:
|
||||||
- customresourcedefinitions
|
- customresourcedefinitions
|
||||||
verbs: ['create', 'get', 'patch', 'delete']
|
verbs: ['create', 'get', 'patch', 'delete']
|
||||||
|
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
|
||||||
- apiGroups: ['policy']
|
- apiGroups: ['policy']
|
||||||
resources: ['podsecuritypolicies']
|
resources: ['podsecuritypolicies']
|
||||||
verbs: ['use']
|
verbs: ['use']
|
||||||
resourceNames:
|
resourceNames:
|
||||||
- {{ .Chart.Name }}-manager
|
- {{ .Chart.Name }}-manager
|
||||||
|
{{- end }}
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
|
@ -39,6 +41,7 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
app: {{ .Chart.Name }}-manager
|
app: {{ .Chart.Name }}-manager
|
||||||
---
|
---
|
||||||
|
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
|
||||||
apiVersion: policy/v1beta1
|
apiVersion: policy/v1beta1
|
||||||
kind: PodSecurityPolicy
|
kind: PodSecurityPolicy
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -70,3 +73,4 @@ spec:
|
||||||
volumes:
|
volumes:
|
||||||
- 'configMap'
|
- 'configMap'
|
||||||
- 'secret'
|
- 'secret'
|
||||||
|
{{- end }}
|
||||||
|
|
Loading…
Reference in New Issue