Skip to content

Commit

Permalink
Merge pull request #3399 from chrischdi/prepare-securitycontext-for-psa
Browse files Browse the repository at this point in the history
add explicit securityContexts to the controller and namespace label for privileged
  • Loading branch information
k8s-ci-robot authored Apr 21, 2023
2 parents 94b703e + 4aeec5e commit 7bed3d0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/default/namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ apiVersion: v1
kind: Namespace
metadata:
name: system
labels:
# this is required due to the nmi daemonset
pod-security.kubernetes.io/enforce: privileged
11 changes: 11 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsUser: 65532
runAsGroup: 65532
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
terminationGracePeriodSeconds: 10
serviceAccountName: manager
tolerations:
Expand Down

0 comments on commit 7bed3d0

Please sign in to comment.