1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/examples/DaemonSet/policy-ds.yaml

22 lines
562 B
YAML
Raw Normal View History

apiVersion : policy.nirmata.io/v1alpha1
kind : Policy
metadata :
name : policy-daemonset
spec :
failurePolicy: stopOnError
rules:
- resource:
kind : DaemonSet
selector:
matchLabels:
originalLabel: isHere
patch:
- path: "/metadata/labels/isMutated"
op: add
value: "true"
- path: "/metadata/labels/originalLabel"
op: remove
- path : "/spec/template/spec/containers/0/image"
op : replace
value: "k8s.gcr.io/fluentd-elasticsearch:latest"