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

fix(docs): Updated mutateExistingOnPolicyUpdate documentation to include validation info #1346

Merged
merged 4 commits into from
Sep 18, 2024

Conversation

mvaal
Copy link
Contributor

@mvaal mvaal commented Sep 12, 2024

Related issue

Proposed Changes

Documentation around mutateExistingOnPolicyUpdate was not complete and I kept running into the same issue forgetting to include the mutate target. This add that additional information to the documentation.

Here is the corresponding kyverno validation code: https://github.com/kyverno/kyverno/blob/43173e6c76a6381ab27b8b2979c82d265c605ccf/api/kyverno/v1/spec_types.go#L360

Checklist

  • I have read the contributing guidelines.
  • I have inspected the website preview for accuracy.
  • I have signed off my issue.

…lidation info

Signed-off-by: mvaal <mvaal@expediagroup.com>
Copy link

welcome bot commented Sep 12, 2024

Thanks for opening your first Pull Request here! Please check out our Contributing guidelines and confirm that you Signed off.

@mvaal mvaal changed the title fix: Updated mutateExistingOnPolicyUpdate documentation to include validation info docs: Updated mutateExistingOnPolicyUpdate documentation to include validation info Sep 12, 2024
@mvaal mvaal changed the title docs: Updated mutateExistingOnPolicyUpdate documentation to include validation info fix(docs): Updated mutateExistingOnPolicyUpdate documentation to include validation info Sep 12, 2024
Signed-off-by: mvaal <mvaal@expediagroup.com>
@mvaal
Copy link
Contributor Author

mvaal commented Sep 12, 2024

Also, this documentation seems to be wrong:

When defining a list of targets[], the fields name and namespace are not strictly required but encouraged. If omitted, it implies a wildcard ("*") for the omitted field which can have unintended impact on other resources.

From my experience, namespace is required. I can make that fix here as well if confirmed.

@realshuting
Copy link
Member

Thanks for the contribution @mvaal !

Also, this documentation seems to be wrong:

When defining a list of targets[], the fields name and namespace are not strictly required but encouraged. If omitted, it implies a wildcard ("*") for the omitted field which can have unintended impact on other resources.

From my experience, namespace is required. I can make that fix here as well if confirmed.

Why namespace is required for targets? A target could be a cluster-wide resource.

@mvaal
Copy link
Contributor Author

mvaal commented Sep 13, 2024

Hey @realshuting!

Why namespace is required for targets? A target could be a cluster-wide resource.

That was my use case. I was running into some error where it kept saying that targets[*].namespace was required, but now I am unable to reproduce it, so you can ignore that comment. Sorry!

Copy link
Member

@realshuting realshuting left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution @mvaal !

Signed-off-by: mvaal <mvaal@expediagroup.com>
@mvaal
Copy link
Contributor Author

mvaal commented Sep 17, 2024

I fixed a consistency issue and updated the docs to be a little more readable based on conversation found here:
https://kubernetes.slack.com/archives/CLGR9BJU9/p1726606583673049

@realshuting realshuting merged commit f454dd9 into kyverno:main Sep 18, 2024
5 of 6 checks passed
Copy link

welcome bot commented Sep 18, 2024

Congratulations! 🎉

Great job merging your first Pull Request here! How awesome! If you are new to this project, feel free to join our Slack community.

200w

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.

4 participants