SCHED-2200: Update k8s libraries to v0.36 and controller-runtime to v0.24#2784
Open
theyoprst wants to merge 2 commits into
Open
SCHED-2200: Update k8s libraries to v0.36 and controller-runtime to v0.24#2784theyoprst wants to merge 2 commits into
theyoprst wants to merge 2 commits into
Conversation
Bump the go directive to 1.26.0 and golang base images to 1.26. Switch gomodguard to gomodguard_v2 in the linter config. golang.org/x/exp becomes an indirect dependency and mockery output picks up go1.26 formatting.
Bump k8s.io/api, apimachinery, client-go to v0.36.3 and sigs.k8s.io/controller-runtime to v0.24.1 (both require Go 1.26). Migrate the three admission webhooks to the generic typed builder and admission.Validator[T] introduced in controller-runtime v0.23. Add events.k8s.io RBAC alongside core events: the manager records events through the events/v1 API now. Bump controller-tools to v0.21.0 and setup-envtest to release-0.24, wire ENVTEST_VERSION into the install rule. Regenerate CRDs, RBAC, webhook manifests and helm output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Kubernetes libraries are at v0.34 and controller-runtime at v0.22, two releases behind. controller-runtime v0.23 changed the webhook builder API and moved event recording to the
events.k8s.ioAPI group, so the bump needs code and RBAC changes. Both target versions require Go 1.26 (previous PR in the stack, #2789).Solution
k8s.io/api,apimachinery,client-goto v0.36.3 andcontroller-runtimeto v0.24.1admission.Validator[T], dropping theruntime.Objecttype assertionsevents.k8s.ioto events RBAC (kubebuilder markers, leader election role, hand-maintained helm leader-election template); the manager records events viaevents/v1nowENVTEST_VERSIONvariable into the install ruleResult{Requeue: true}is deprecated in v0.24 but still honored; migrating it toRequeueAfterchanges backoff behavior and is left for a follow-up.Testing
Full unit suite (fake client SSA changes did not break tests),
make lint,make sync-version-from-scratch UNSTABLE=falseidempotent.Release Notes
None