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

chore: add information to get path and action for mutation #1349

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
4 changes: 4 additions & 0 deletions content/en/docs/writing-policies/tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ Depending on the level of detail needed, you may need to increase the log level.

* Need to mutate an object at a specific ordered position within an array? Use the [`patchesJson6902`](mutate.md#rfc-6902-jsonpatch) method.

* Just like in `validate` rules, in some less common cases Kyverno will attempt to validate the schema of a policy and fail because it cannot determine if it satisfies the OpenAPI schema definition for that resource. In mutate rules, Kyverno will internally try to generate a patch to see if the policy would be valid. In these cases add `spec.schemaValidation: false` to your policy to tell Kyverno to skip validation. This is similar to passing the `--validate` flag to `kubectl`.
Copy link
Member

@realshuting realshuting Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spec.schemaValidation is no longer used, what version are you targeting?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't explicitly added these changes; I remember they came in as a part of a pull let me edit this.


* Need to check the path of mutation or the actual action performed by mutation? Set `-v=6` and grep on `generated patches`

## Generate

* `generate` rules which trigger off the same source object should be organized in the same policy definition.
Expand Down
Loading