mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 01:16:55 +00:00
25 lines
588 B
YAML
25 lines
588 B
YAML
apiVersion: kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: set-runasnonroot-true
|
|
spec:
|
|
rules:
|
|
- name: set-runasnonroot-true
|
|
match:
|
|
any:
|
|
- resources:
|
|
kinds:
|
|
- Pod
|
|
mutate:
|
|
patchStrategicMerge:
|
|
spec:
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
initContainers:
|
|
- (name): "*"
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
containers:
|
|
- (name): "*"
|
|
securityContext:
|
|
runAsNonRoot: true
|