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: clarify mutate exisitng vs standard mutate policy #1293

Merged
merged 3 commits into from
Jun 28, 2024

Conversation

realshuting
Copy link
Member

This PR clarifies stand mutate policy VS mutate existing policy. This is from Kyveno Slack:

but how exactly is this different from a standard mutate policy?

Signed-off-by: ShutingZhao <shuting@nirmata.com>
@chipzoller
Copy link
Member

This is already present in the same doc in the next paragraph:

To define such a policy, trigger resources need to be specified in the match block. The target resources–resources targeted for mutation–are specified in each mutate rule under mutate.targets.

@realshuting
Copy link
Member Author

This is already present in the same doc in the next paragraph:

To define such a policy, trigger resources need to be specified in the match block. The target resources–resources targeted for mutation–are specified in each mutate rule under mutate.targets.

Yes, but I want to distinguish between a mutate existing policy and a standard mutate policy. The current doc doesn't seem to define what is a standard mutate policy. Could you help suggest?

@JimBugwadia
Copy link
Member

Yes, I was not clear on the difference as well. It will be good to state explicitly early in the text, when we introduce the concept.

@chipzoller
Copy link
Member

The docs for this section state, in the following order:

  1. the concept of mutate existing
  2. how they function
  3. how to author them

If you feel this isn't clear, it should go in the third section which is the paragraph under the "two important implications". Maybe something like:

To define such a policy, trigger resources need to be specified in the match block. The target resources–resources targeted for mutation–are specified in each mutate rule under mutate.targets. Mutate existing rules differ from standard mutate rules when these targets are defined. Note that all target resources within a single rule must share the same definition schema. For example, a mutate existing rule fails if this rule mutates both Pod and Deployment as they do not share the same OpenAPI V3 schema (except metadata).

Signed-off-by: ShutingZhao <shuting@nirmata.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
@realshuting
Copy link
Member Author

The docs for this section state, in the following order:

  1. the concept of mutate existing
  2. how they function
  3. how to author them

If you feel this isn't clear, it should go in the third section which is the paragraph under the "two important implications". Maybe something like:

To define such a policy, trigger resources need to be specified in the match block. The target resources–resources targeted for mutation–are specified in each mutate rule under mutate.targets. Mutate existing rules differ from standard mutate rules when these targets are defined. Note that all target resources within a single rule must share the same definition schema. For example, a mutate existing rule fails if this rule mutates both Pod and Deployment as they do not share the same OpenAPI V3 schema (except metadata).

Updated, please take a look, thanks!

@chipzoller chipzoller merged commit b337024 into main Jun 28, 2024
6 checks passed
@chipzoller chipzoller deleted the clarify_mutate_existing_specification branch June 28, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants