add securityContext for PSS compliance
This commit is contained in:
+11
-1
@@ -14,7 +14,17 @@ spec:
|
||||
labels:
|
||||
app: probe-exec
|
||||
spec:
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: probe-exec
|
||||
image: busybox:1.36
|
||||
command: ["sh","-c","echo 'PROBE-START'; env | sort | sed 's/=.*/=REDACTED/'; echo '--- secret mount test'; ls -la /mnt/secrets-store/db 2>&1 | head -20; sleep 3000"]
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
command: ["sh","-c","echo 'PROBE-POD-RUNNING in ns'; hostname; cat /var/run/secrets/kubernetes.io/serviceaccount/namespace; echo; sleep 3000"]
|
||||
|
||||
Reference in New Issue
Block a user