Skip to content

Commit

Permalink
fix: Don't create PSP if k8s >= 1.25
Browse files Browse the repository at this point in the history
  • Loading branch information
rossf7 authored and bpetit committed May 11, 2023
1 parent b64497b commit 933e29b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helm/scaphandre/templates/psp.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Capabilities.APIVersions.Has "policy/v1beta1" }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down Expand Up @@ -26,3 +27,4 @@ spec:
- projected
hostPID: true
hostIPC: true
{{- end }}
2 changes: 2 additions & 0 deletions helm/scaphandre/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ metadata:
labels:
{{- include "labels.common" . | nindent 4 }}
rules:
{{- if .Capabilities.APIVersions.Has "policy/v1beta1" }}
- apiGroups:
- extensions
resources:
Expand All @@ -28,6 +29,7 @@ rules:
- {{ .Chart.Name }}
verbs:
- "use"
{{- end }}
- apiGroups:
- ""
resources:
Expand Down

0 comments on commit 933e29b

Please sign in to comment.