Updated ConfigMap example due to the policy-v2 spec
-apiVersion : policy.nirmata.io/v1alpha1
+apiVersion : kubepolicy.nirmata.io/v1alpha1
kind: Policy
metadata :
- name : policy-test
+ name: policy-configmap-test
spec:
- failurePolicy: stopOnError
rules:
- - resource:
+ - name: "Policy ConfigMap sample rule"
+ resource:
kind : ConfigMap
name: "game-config"
- patch:
+ mutate:
+ patches:
- path: "/data/newKey"
op: add
value: newValue
