Skip to content

Commit

Permalink
docs: add warning for the mutateExistingOnPolicyUpdate deprecated fie…
Browse files Browse the repository at this point in the history
…ld (#1384)

Signed-off-by: Mariam Fahmy <[email protected]>
Co-authored-by: shuting <[email protected]>
  • Loading branch information
MariamFahmy98 and realshuting authored Oct 14, 2024
1 parent a29e175 commit 8ce82a7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
10 changes: 5 additions & 5 deletions content/en/docs/writing-policies/mutate.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,6 @@ kind: ClusterPolicy
metadata:
name: mutate-existing-secret
spec:
mutateExistingOnPolicyUpdate: true
rules:
- name: mutate-secret-on-configmap-event
match:
Expand All @@ -483,6 +482,7 @@ spec:
namespaces:
- staging
mutate:
mutateExistingOnPolicyUpdate: true
# ...
targets:
- apiVersion: v1
Expand All @@ -508,7 +508,6 @@ kind: ClusterPolicy
metadata:
name: refresh-env-var-in-pods
spec:
mutateExistingOnPolicyUpdate: false
rules:
- name: refresh-from-secret-env
match:
Expand All @@ -522,6 +521,7 @@ spec:
operations:
- UPDATE
mutate:
mutateExistingOnPolicyUpdate: false
targets:
- apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -622,7 +622,6 @@ kind: ClusterPolicy
metadata:
name: sync-cms
spec:
mutateExistingOnPolicyUpdate: false
rules:
- name: concat-cm
match:
Expand All @@ -635,6 +634,7 @@ spec:
namespaces:
- foo
mutate:
mutateExistingOnPolicyUpdate: false
targets:
- apiVersion: v1
kind: ConfigMap
Expand All @@ -660,7 +660,6 @@ kind: ClusterPolicy
metadata:
name: sync-cms
spec:
mutateExistingOnPolicyUpdate: false
rules:
- name: concat-cm
match:
Expand All @@ -673,6 +672,7 @@ spec:
namespaces:
- foo
mutate:
mutateExistingOnPolicyUpdate: false
targets:
- apiVersion: v1
kind: ConfigMap
Expand Down Expand Up @@ -918,7 +918,6 @@ kind: ClusterPolicy
metadata:
name: demo-cluster-policy
spec:
mutateExistingOnPolicyUpdate: false
rules:
- name: demo-generate
match:
Expand Down Expand Up @@ -951,6 +950,7 @@ spec:
matchLabels:
custom/related-namespace: "?*"
mutate:
mutateExistingOnPolicyUpdate: false
targets:
- apiVersion: v1
kind: Namespace
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/writing-policies/policy-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A [policy](../kyverno-policies) contains one or more rules, and the following co

* **generateExisting**: applicable to generate rules only. Controls whether Kyverno should evaluate the policy the moment it is created.

* **mutateExistingOnPolicyUpdate**: applicable to mutate rules which define targets. Controls whether Kyverno should evaluate the policy when it is updated.
* **mutateExistingOnPolicyUpdate**: applicable to mutate rules which define targets. Controls whether Kyverno should evaluate the policy when it is updated. This field is deprecated as of 1.13. Scheduled to be removed in a future version. Use `mutateExistingOnPolicyUpdate` under the mutate rule instead.

* **schemaValidation**: controls whether policy validation checks are applied. Defaults to "true". Kyverno will attempt to validate the schema of a policy and fail if it cannot determine it satisfies the OpenAPI schema definition for that resource. Can occur on either validate or mutate policies. Set to "false" to skip schema validation. This field is deprecated as of 1.11 and currently has no effect. Scheduled to be removed in a future version.

Expand Down
3 changes: 1 addition & 2 deletions content/en/docs/writing-policies/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,7 @@ kind: ClusterPolicy
metadata:
name: vault-auth-backend
spec:
validationFailureAction: Audit
background: true
mutateExistingOnPolicyUpdate: true
rules:
- name: vault-injector-config-blue-to-green-auth-backend
context:
Expand All @@ -523,6 +521,7 @@ spec:
namespaces:
- corp-tech-ap-team-ping-ep
mutate:
mutateExistingOnPolicyUpdate: true
patchStrategicMerge:
data:
config: '{{- hcl }}'
Expand Down

0 comments on commit 8ce82a7

Please sign in to comment.