feat: Add validationActions field type to PolicyException to override vpol validationAction#85
feat: Add validationActions field type to PolicyException to override vpol validationAction#85naseyro wants to merge 1 commit into
Conversation
|
Why do we need this? |
|
The original issue is to add this field in policyexception to override the failure action. |
@realshuting I think I misunderstood this, I thought about introducing an override for validationActions |
f495ee2 to
e788b66
Compare
@realshuting I made changes and updated the PR title and description |
|
Please resolve all comments once addressed. |
There was a problem hiding this comment.
Pull request overview
This PR extends the PolicyException API to support overriding a referenced policy’s validationActions, enabling per-exception control over ValidatingPolicy enforcement behavior.
Changes:
- Added
validationActionstoPolicyRefin the PolicyException API (Go types + deepcopy support). - Updated generated CRD manifests (raw + aggregated + Helm chart template) to expose the new field.
- Updated generated CRD documentation HTML to include the new field.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/user/crd/kyverno_cel_policies.v1alpha1.html | Generated CRD docs updated to document validationActions on PolicyRef. |
| docs/user/crd/index.html | Generated CRD index updated to include validationActions in PolicyRef. |
| config/crds/policies.kyverno.io_policyexceptions.yaml | PolicyException CRD schema updated to include policyRefs[].validationActions (multiple version blocks). |
| config/crds.yaml | Aggregated CRDs updated to include policyRefs[].validationActions (multiple version blocks). |
| charts/kyverno-api/templates/crds/policies.kyverno.io_policyexceptions.yaml | Helm CRD template updated to include policyRefs[].validationActions (multiple version blocks). |
| api/policies.kyverno.io/v1alpha1/zz_generated.deepcopy.go | Deepcopy generation updated to deep-copy PolicyRef elements due to the new slice field. |
| api/policies.kyverno.io/v1alpha1/policy_exception.go | Added validationActions field to PolicyRef. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
202219c to
feb5a4d
Compare
feb5a4d to
a1f46a7
Compare
Signed-off-by: Omar Nasser <omarnasserjr@gmail.com>
Explanation
We need to support override for ValidatingPolicy
validationActionsin PolicyException so in order to do that we need to define thevalidationActionfield first in PolicyException APIFor the CEL version
Related issue
Needed for: kyverno/kyverno#14927 and its PR: kyverno/kyverno#16481
Proposed Changes
validationActionfield to PolicyExceptionChecklist
Further Comments