mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-10 01:46:55 +00:00
24 lines
621 B
YAML
24 lines
621 B
YAML
apiVersion : policy.nirmata.io/v1alpha1
|
|
kind : Policy
|
|
metadata :
|
|
name : policy-statefulset
|
|
spec :
|
|
failurePolicy: stopOnError
|
|
rules:
|
|
- resource:
|
|
kind : StatefulSet
|
|
selector:
|
|
matchLabels:
|
|
originalLabel: isHere
|
|
patch:
|
|
- path: "/spec/template/metadata/labels/isMutated"
|
|
op: add
|
|
value: "true"
|
|
- path: "/metadata/labels/isMutated"
|
|
op: add
|
|
value: "true"
|
|
- path : "/metadata/labels/originalLabel"
|
|
op : remove
|
|
- path : "/spec/serviceName"
|
|
op : replace
|
|
value : "not-a-nginx"
|