mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
e200cdc2a4
policies are modified according to new logic
21 lines
460 B
YAML
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"
|