Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add warning for the mutateExistingOnPolicyUpdate deprecated field #1384

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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