Skip to content
This repository was archived by the owner on Jan 19, 2026. It is now read-only.

feat!: Implement vap scaffold vap for paramKind, paramRef, failurePolicy#1390

Merged
viccuad merged 5 commits intokubewarden:mainfrom
viccuad:feat/vap-params
Oct 7, 2025
Merged

feat!: Implement vap scaffold vap for paramKind, paramRef, failurePolicy#1390
viccuad merged 5 commits intokubewarden:mainfrom
viccuad:feat/vap-params

Conversation

@viccuad
Copy link
Copy Markdown
Member

@viccuad viccuad commented Oct 6, 2025

Description

Part of kubewarden/cel-policy#161

Test

Added unit test case.

Additional Information

Tradeoff

Potential improvement

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.18%. Comparing base (c7d5024) to head (229f05b).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1390      +/-   ##
==========================================
- Coverage   87.50%   87.18%   -0.33%     
==========================================
  Files          34       34              
  Lines        4955     4565     -390     
==========================================
- Hits         4336     3980     -356     
+ Misses        619      585      -34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@viccuad viccuad moved this from Pending review to In Progress in Kubewarden Admission Controller Oct 7, 2025
Copy link
Copy Markdown
Member

@flavio flavio left a comment

Choose a reason for hiding this comment

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

LGTM, I left a minor suggestion

@flavio
Copy link
Copy Markdown
Member

flavio commented Oct 7, 2025

I think we should cover the migration of these fields of the VAP policy too

On the cel-policy from Kubewarden:
- `spec.failurePolicy`: For Webhook behaviour
- `spec.settings.failurePolicy`: For CEL behaviour

Signed-off-by: Víctor Cuadrado Juan <[email protected]>
@viccuad
Copy link
Copy Markdown
Member Author

viccuad commented Oct 7, 2025

I think we should cover the migration of these fields of the VAP policy too

* `spec.paramRef.parameterNotFoundAction`

This is already included when populating spec.settings.paramRef.

* the `failurePolicy` of the CEL policy should be migrated to `settings.failurePolicy`. This is something that has been recently added by [feat(params): enabling paramKind and paramRef to the policy cel-policy#185](https://github.com/kubewarden/cel-policy/pull/185)

Indeed. This is done in bc10bec.

This is incredibly annoying, I have locally the same components as the
CI:
`stable-x86_64-unknown-linux-gnu unchanged - rustc 1.90.0 (1159e78c4 2025-09-14)`

yet the CI fails on rustfmt.

Signed-off-by: Víctor Cuadrado Juan <[email protected]>
@viccuad viccuad changed the title feat: Implement vap scaffold vap for paramKind, paramRef feat!: Implement vap scaffold vap for paramKind, paramRef, failurePolicy Oct 7, 2025
@viccuad viccuad moved this from In Progress to Pending review in Kubewarden Admission Controller Oct 7, 2025
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.

Besides my small suggestion, LGTM

Co-authored-by: José Guilherme Vanz <[email protected]>
Signed-off-by: Víctor Cuadrado Juan <[email protected]>
@viccuad viccuad merged commit 4afcff2 into kubewarden:main Oct 7, 2025
15 of 17 checks passed
@github-project-automation github-project-automation bot moved this from Pending review to Done in Kubewarden Admission Controller Oct 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Development

Successfully merging this pull request may close these issues.

3 participants