Skip to content

Commit

Permalink
Install the PSP on Kubernetes 1.24 and earlier only
Browse files Browse the repository at this point in the history
  • Loading branch information
rosti committed Sep 26, 2022
1 parent ac2b79a commit 83971c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4496,6 +4496,7 @@ kind: ServiceAccount
metadata:
name: cbcontainers-operator
namespace: cbcontainers-dataplane
{{- if and (eq (int .Capabilities.KubeVersion.Major) 1) (lt (int .Capabilities.KubeVersion.Minor) 25) }}
---
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
Expand All @@ -4519,6 +4520,7 @@ spec:
rule: RunAsAny
volumes:
- '*'
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand Down
1 change: 0 additions & 1 deletion config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ resources:
- auth_proxy_role.yaml
- auth_proxy_role_binding.yaml
# - auth_proxy_client_clusterrole.yaml
- pod_security_policy.yaml
2 changes: 1 addition & 1 deletion config/rbac/pod_security_policy.yaml → operator_psp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: manager-psp
name: cbcontainers-manager-psp
spec:
privileged: true
hostPID: true
Expand Down

0 comments on commit 83971c5

Please sign in to comment.