kubewarden / kubewarden-controller

Manage admission policies in your Kubernetes cluster with ease
https://kubewarden.io
Apache License 2.0
181 stars 30 forks source link

fix: its not necessary add the finalizer in the reconciliation loop. #779

Closed jvanz closed 4 days ago

jvanz commented 1 week ago

Description

The finalizer used by the Kubewarden controller is added in the webhook for the policy server and policies types. Therefore, it not needed to add it in the reconciliation loop. Furthermore, the deletion reconciliation is able to handle old finalizer as well. So, this change will not cause issues when deleting resources.

codecov[bot] commented 4 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 73.39%. Comparing base (030edce) to head (79b9aaf). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #779 +/- ## ========================================== - Coverage 74.28% 73.39% -0.89% ========================================== Files 28 28 Lines 1816 1808 -8 ========================================== - Hits 1349 1327 -22 - Misses 352 363 +11 - Partials 115 118 +3 ``` | [Flag](https://app.codecov.io/gh/kubewarden/kubewarden-controller/pull/779/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewarden) | Coverage Δ | | |---|---|---| | [integration-tests](https://app.codecov.io/gh/kubewarden/kubewarden-controller/pull/779/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewarden) | `61.22% <ø> (-0.95%)` | :arrow_down: | | [unit-tests](https://app.codecov.io/gh/kubewarden/kubewarden-controller/pull/779/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewarden) | `50.19% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewarden#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.