1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
kyverno/test/Namespace/policy-namespace.yaml
Anton Kostenko e200cdc2a4 new policy structure
policies are modified according to new logic
2019-05-21 17:54:55 +03:00

21 lines
460 B
YAML

apiVersion: kubepolicy.nirmata.io/v1alpha1
kind: Policy
metadata :
name : policy-namespace
spec :
rules:
- name: ns1
resource:
kind : Namespace
selector:
matchLabels:
LabelForSelector : "namespace"
mutate:
patches:
- path: "/metadata/labels/replaced"
op: add
value: "yes"
- path: "/metadata/name"
op: replace
value: "modified-namespace"