fix: accept YAML udev discoveryDetails in validating webhook#802
Conversation
The udev discoveryDetails are YAML in the Helm templates, sample configurations, and runtime discovery parser, but the validating webhook was parsing them as JSON. That caused valid demo and chart-generated udev configurations to be rejected when the webhook was enabled. Switch the webhook validation path to YAML parsing and restore the udev e2e fixtures to YAML so validation, tests, and shipped examples all use the same format. Fixes: 015c617 ("device mount permission check in webhook") Signed-off-by: Tom Wieczorek <twieczorek@mirantis.com>
|
/version patch |
gauravgahlot
left a comment
There was a problem hiding this comment.
Thank you for your contribution. 💜
You should revert the version.sh file.
That was modified automatically by GitHub Actions in 995bbcf, so I didn't touch that at all. What's the desired way to tackle this? Amend 995bbcf and revert the spurious version edits, or maybe squash the whole automatic commit directly into my commit, fixing this up altogether? |
|
Thank you @twz123! Just 2 notes:
|
Yes, I intentionally referenced the PR that introduced the regression.
@jnummelin has created a fun talk about Akri and k0s that he and I have been giving at various occasions. My PRs are mainly a result of our debugging attempts when preparing the demos 😅 |
What this PR does / why we need it:
The udev discoveryDetails are YAML in the Helm templates, sample configurations, and runtime discovery parser, but the validating webhook was parsing them as JSON. That caused valid demo and chart-generated udev configurations to be rejected when the webhook was enabled.
Switch the webhook validation path to YAML parsing and restore the udev e2e fixtures to YAML so validation, tests, and shipped examples all use the same format.
Fixes:
Special notes for your reviewer:
If applicable:
cargo fmt)cargo build)cargo clippy)cargo test)cargo doc)