vmware-tanzu / pinniped

Pinniped is the easy, secure way to log in to your Kubernetes clusters.
https://pinniped.dev
Apache License 2.0
541 stars 65 forks source link

only auto-detect version v1 of ValidatingAdmissionPlugin during startup #1934

Closed cfryanr closed 4 months ago

cfryanr commented 4 months ago

This is a follow-up to #1921.

CI showed that in an AKS 1.29 cluster which had version v1beta1 of admissionregistration.k8s.io, Pinniped would fail because the new 1.30 Kube libraries are specifically trying to start a watch for v1 of this resource.

This PR changes our new auto-detection code to specifically look for v1, and to only enable the validating admission plugin when v1 is found.

Release note:

NONE
codecov[bot] commented 4 months ago

Codecov Report

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

Project coverage is 29.39%. Comparing base (424e740) to head (85e5970).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1934 +/- ## ======================================= Coverage 29.39% 29.39% ======================================= Files 350 350 Lines 58519 58518 -1 ======================================= + Hits 17202 17203 +1 + Misses 40802 40800 -2 Partials 515 515 ```

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