Skip to content

Commit 933e29b

Browse files
rossf7bpetit
authored andcommitted
fix: Don't create PSP if k8s >= 1.25
1 parent b64497b commit 933e29b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

helm/scaphandre/templates/psp.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Capabilities.APIVersions.Has "policy/v1beta1" }}
12
apiVersion: policy/v1beta1
23
kind: PodSecurityPolicy
34
metadata:
@@ -26,3 +27,4 @@ spec:
2627
- projected
2728
hostPID: true
2829
hostIPC: true
30+
{{- end }}

helm/scaphandre/templates/rbac.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ metadata:
2020
labels:
2121
{{- include "labels.common" . | nindent 4 }}
2222
rules:
23+
{{- if .Capabilities.APIVersions.Has "policy/v1beta1" }}
2324
- apiGroups:
2425
- extensions
2526
resources:
@@ -28,6 +29,7 @@ rules:
2829
- {{ .Chart.Name }}
2930
verbs:
3031
- "use"
32+
{{- end }}
3133
- apiGroups:
3234
- ""
3335
resources:

0 commit comments

Comments
 (0)