Closed flavio closed 1 month ago
CC @williamlin-suse
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 70.65%. Comparing base (
4be87f4
) to head (f05f8aa
). Report is 2 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
For completion, the check performed in CheckAdmissionWebhookMatchConditions()
may fail indeed, as we are using OpenAPIV3 to query the cluster. This Kubernetes feature is alpha since 1.23 (and may not be enabled), yet only GA since 1.27. But we shouldn't halt indeed if there's an error.
Do not exit with an error when the
matchConditions
field is not available for ValidatingWebhookConfiguration and MutatingWebhookConfiguration.The code is already structured to work when this feature is not available, hence we don't have to cause the controller to exit with an error.
Fixes https://github.com/kubewarden/kubewarden-controller/issues/900