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