Skip to content

Add matchConditions policy example#735

Open
AkashKumar7902 wants to merge 1 commit into
kubewarden:mainfrom
AkashKumar7902:issue-645-matchconditions-example
Open

Add matchConditions policy example#735
AkashKumar7902 wants to merge 1 commit into
kubewarden:mainfrom
AkashKumar7902:issue-645-matchconditions-example

Conversation

@AkashKumar7902
Copy link
Copy Markdown

@AkashKumar7902 AkashKumar7902 commented Apr 26, 2026

Description

Add a spec.matchConditions example to the policies how-to. The new section briefly explains that match conditions are Kubernetes CEL expressions evaluated before the policy webhook is called, links to the Kubernetes documentation, and shows a Deployment example that evaluates pod-privileged only for CREATE requests or Pod template changes.

The same content is added to the current docs and the latest 1.34 versioned docs.

Fixes #645

Checklist

AI usage

OpenAI Codex assisted with this contribution. I reviewed the generated changes and am responsible for them.

Test

  • sed -n '104,122p' docs/howtos/policies.md | yq e . >/dev/null
  • sed -n '104,122p' versioned_docs/version-1.34/howtos/policies.md | yq e . >/dev/null
  • git diff --check
  • corepack yarn build

The docs build succeeds with existing broken-anchor, deprecated Docusaurus config, and stale Browserslist warnings.

Signed-off-by: Akash Kumar <meakash7902@gmail.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 26, 2026

Deploy Preview for docs-kubewarden-io ready!

Name Link
🔨 Latest commit 34543a2
🔍 Latest deploy log https://app.netlify.com/projects/docs-kubewarden-io/deploys/69ee0aaad1269300088c51e6
😎 Deploy Preview https://deploy-preview-735--docs-kubewarden-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jhkrug
Copy link
Copy Markdown
Contributor

jhkrug commented Apr 28, 2026

Hello @AkashKumar7902,

You appear not to have used our docs PR template, which included the following:

Please reinstate this, and answer accordingly. Feel free to reach out to me to discuss in person, if necessary.

Thank you

@jvanz jvanz moved this from Pending review to Blocked in Kubewarden Admission Controller Apr 28, 2026
@AkashKumar7902
Copy link
Copy Markdown
Author

Thanks for pointing this out. I restored the checklist in the PR description and confirmed the AI Policy acknowledgement.

Copy link
Copy Markdown
Member

@jvanz jvanz left a comment

Choose a reason for hiding this comment

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

The documentation is fine to me. But I don't think you need to update the 1.34 version. We are in a migration process to antora and we can avoid additional text to port to it.

@jvanz
Copy link
Copy Markdown
Member

jvanz commented May 15, 2026

@AkashKumar7902 can you take a look in my previous comments?

@flavio
Copy link
Copy Markdown
Member

flavio commented May 20, 2026

can you also rebase against main? We just moved all the docs from docusaurus to antora 🙏

Copy link
Copy Markdown
Member

@jvanz jvanz left a comment

Choose a reason for hiding this comment

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

can you also rebase against main? We just moved all the docs from docusaurus to antora 🙏

@AkashKumar7902, can you address this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Add example on policy using matchConditions

4 participants