1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 09:56:55 +00:00
kyverno/demo/mutate_patch/policy_patch.yaml
2019-06-24 10:40:16 -07:00

23 lines
No EOL
506 B
YAML

apiVersion : kyverno.io/v1alpha1
kind : Policy
metadata :
name : policy-endpoints
spec :
rules:
- name: demo-ep
resource:
kinds :
- Endpoints
selector:
matchLabels:
label : test
mutate:
patches:
# add a new label
- path: "metadata/labels/isMutate"
op: add
value: true
# replace port
- path : "/subsets/0/ports/0/port"
op : replace
value: 9663