kubewarden / kubewarden-controller

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

fix: linter errors and remove requests defaults. #713

Closed fabriziosestito closed 2 months ago

fabriziosestito commented 2 months ago

Description

There were some linter errors we did not catch since the Golangci action is acting funny.

For this reason, the PolicyServer controller integration tests were passing even if the expectation was wrong. I've removed setting requests defaults to limits when the requests are empty to mimic the Kubernetes behavior, which only does this at the Pod level.

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 51.22%. Comparing base (3c264c0) to head (53a129b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #713 +/- ## ========================================== - Coverage 52.02% 51.22% -0.81% ========================================== Files 27 27 Lines 2049 2044 -5 ========================================== - Hits 1066 1047 -19 - Misses 876 887 +11 - Partials 107 110 +3 ``` | [Flag](https://app.codecov.io/gh/kubewarden/kubewarden-controller/pull/713/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/713/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewarden) | `68.82% <ø> (-2.93%)` | :arrow_down: | | [unit-tests](https://app.codecov.io/gh/kubewarden/kubewarden-controller/pull/713/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewarden) | `45.84% <ø> (-0.18%)` | :arrow_down: | 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.

fabriziosestito commented 2 months ago

@jvanz I realized couple of things so I am moving this to in progress/draft