1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-04-08 10:04:25 +00:00

- update doc; -remove duplicate policy

This commit is contained in:
Shuting Zhao 2019-10-30 12:29:57 -07:00
parent 24ea598f12
commit f25a336eeb
2 changed files with 2 additions and 25 deletions

View file

@ -13,10 +13,9 @@ kubectl create -f https://github.com/nirmata/kyverno/raw/master/definitions/inst
````bash
kubectl create -f https://github.com/nirmata/kyverno/raw/master/samples/best_practices/
kubectl create -f https://github.com/nirmata/kyverno/raw/master/samples/more/
kubectl create -f [samples/best_practices/](best_practices/)
kubectl create -f [samples/more/](more/)
````
The policies are mostly validation rules in `audit` mode i.e. your existing workloads will not be impacted, but will be audited for policy complaince.

View file

@ -1,22 +0,0 @@
apiVersion: kyverno.io/v1alpha1
kind: ClusterPolicy
metadata:
name: validate-deny-runasrootuser
spec:
rules:
- name: deny-runasrootuser
match:
resources:
kinds:
- Pod
validate:
message: "Root user is not allowed. Set runAsNonRoot to true."
anyPattern:
- spec:
securityContext:
runAsNonRoot: true
- spec:
containers:
- name: "*"
securityContext:
runAsNonRoot: true