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: Update mutation assign doc #3433

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

anlandu
Copy link
Member

@anlandu anlandu commented Jun 26, 2024

What this PR does / why we need it:
If the demo-privileged Assign is applied out of the box on a cluster, it will cause pods lacking a container "foo" to fail schema validation due to creating a new foo container that's missing required information. Update the example to include a pathtest to align with intended behavior.

Special notes for your reviewer:

Signed-off-by: Anlan Du <adu47249@gmail.com>
@anlandu anlandu requested a review from a team as a code owner June 26, 2024 23:25
@anlandu anlandu changed the title doc: Update mutation assign doc docs: Update mutation assign doc Jun 26, 2024
@anlandu
Copy link
Member Author

anlandu commented Jun 26, 2024

It may have been the case that originally the pathTest guidance was directly above the Assign example--this Assign seems to be the one being referenced when that section refers to "the example below." I can update the wording there if my interepretation is correct. But IMO the example should still have the pathTest: people will copy-paste expecting it to work out of box rather than expect that it includes a footgun followed by a fix for it in a separate code snippet

Copy link
Member

@ritazh ritazh left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for the update!

@anlandu anlandu merged commit e7987fb into open-policy-agent:master Jun 27, 2024
4 checks passed
@anlandu anlandu deleted the update-mutation-assign-doc branch June 27, 2024 03:33
David-Jaeyoon-Lee pushed a commit to David-Jaeyoon-Lee/gatekeeper that referenced this pull request Jul 1, 2024
Signed-off-by: Anlan Du <adu47249@gmail.com>
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.

2 participants