1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/test/DaemonSet/policy-daemonset.yaml
Anton Kostenko 2997a5139b updated policies
updated policies according to new policy structure for testing
2019-05-21 17:56:59 +03:00

27 lines
692 B
YAML

apiVersion: kubepolicy.nirmata.io/v1alpha1
kind: Policy
metadata:
name: policy-daemonset
spec:
rules:
- name: "Patch and Volume validation"
resource:
kind: DaemonSet
name: fluentd-elasticsearch
mutate:
patches:
- path: "/metadata/labels/isMutated"
op: add
value: "true"
- path: "/metadata/labels/originalLabel"
op: remove
validate:
message: "This daemonset is broken"
pattern:
spec:
template:
spec:
containers:
volumeMounts:
- name: varlibdockercontainers
readOnly: false