chore: bump controller-runtime to v0.23.3 and migrate DiscoveredCluster webhook - #2360
chore: bump controller-runtime to v0.23.3 and migrate DiscoveredCluster webhook#2360manusa wants to merge 1 commit into
Conversation
…er webhook controller-runtime v0.20 removed webhook.Defaulter/webhook.Validator and v0.23 replaced the untyped NewWebhookManagedBy(mgr).For(obj) builder, so the DiscoveredCluster webhook moves to builder.WebhookManagedBy(mgr, obj) with the typed admission.Defaulter/admission.Validator interfaces, as done in stolostron/backplane-operator#3153. Validation behavior is unchanged and now covered by unit tests. setup-envtest moves to release-0.23 (Kubernetes 1.35.0 assets), which no longer accepts --use-deprecated-gcs. Signed-off-by: Marc Nuri <marc@marcnuri.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: manusa The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @manusa. Thanks for your PR. I'm waiting for a stolostron member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Description
Moves the DiscoveredCluster webhook to the typed admission API so controller-runtime can be upgraded again.
discovery is still on controller-runtime v0.19.4. The Konflux bumps to v0.23/v0.24 (#1582, #1912, #2056, #2201) couldn't merge because
api/v1/discovery_webhook.gouseswebhook.Defaulter/webhook.Validator(removed in v0.20) and the untypedctrl.NewWebhookManagedBy(mgr).For(r)builder (replaced in v0.23).It also affects consumers of the API package: anything importing
github.com/stolostron/discovery/api/v1with controller-runtime >= v0.20 fails to compile. In fabric8io/kubernetes-client it's the last thing keeping our model generator off the Kubernetes 1.37 libraries.The approach is the same as stolostron/backplane-operator#3153.
Related Issue
None filed, context above.
Changes Made
DiscoveredClusterwebhook usesbuilder.WebhookManagedBy(mgr, r)with typedadmission.Defaulter/admission.Validator; validation logic is unchangedDefault,ValidateCreate,ValidateUpdateandValidateDeleteENVTEST_K8S_VERSION1.25 → 1.35.0; dropped--use-deprecated-gcs, which release-0.23 no longer acceptszz_generated.deepcopy.goas regenerated bymake generateChecklist
make test(including the envtest controllers suite),go vet ./...,make generate manifestsAdditional Notes
With this change
api/v1also builds against controller-runtime v0.25.1 and k8s.io v0.37.0, which downstream consumers such as fabric8io/kubernetes-client need.Reviewers
/cc @dislbenn