mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
22 lines
562 B
YAML
22 lines
562 B
YAML
|
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"
|