mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 07:57:07 +00:00
27 lines
440 B
YAML
27 lines
440 B
YAML
apiVersion : policy.nirmata.io/v1alpha1
|
|
|
|
kind : Policy
|
|
|
|
metadata :
|
|
name : policy-namespace
|
|
|
|
spec :
|
|
failurePolicy: stopOnError
|
|
|
|
rules:
|
|
- resource:
|
|
kind : Namespace
|
|
selector:
|
|
matchLabels:
|
|
LabelForSelector : "namespace"
|
|
|
|
patch:
|
|
- path: "/metadata/labels/replaced"
|
|
op: add
|
|
value: "yes"
|
|
- path: "/metadata/name"
|
|
op: replace
|
|
value: "modified-namespace-name"
|
|
|
|
|
|
|