1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-12 10:56:54 +00:00
kyverno/examples/PodTemplate/policy-PodTemplate.yaml
2019-03-19 14:06:12 +02:00

21 lines
534 B
YAML

apiVersion : policy.nirmata.io/v1alpha1
kind : Policy
metadata :
name : test-podtemplate
spec :
failurePolicy: stopOnError
rules:
- resource:
kind : PodTemplate
selector:
matchLabels:
originalLabel: isHere
patch:
- path: "/metadata/labels/app"
op : replace
value : mutedApp
- path: "/template/spec/containers/0/name"
op : replace
value : my-mutated-app
- path: "/metadata/labels/originalLabel"
op : remove