Skip to content

SCHED-2200: Update k8s libraries to v0.36 and controller-runtime to v0.24#2784

Open
theyoprst wants to merge 2 commits into
SCHED-2200/0from
SCHED-2200/1
Open

SCHED-2200: Update k8s libraries to v0.36 and controller-runtime to v0.24#2784
theyoprst wants to merge 2 commits into
SCHED-2200/0from
SCHED-2200/1

Conversation

@theyoprst

@theyoprst theyoprst commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

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.io API group, so the bump needs code and RBAC changes. Both target versions require Go 1.26 (previous PR in the stack, #2789).

Solution

  • bump k8s.io/api, apimachinery, client-go to v0.36.3 and controller-runtime to v0.24.1
  • migrate the three admission webhooks to the generic typed builder and admission.Validator[T], dropping the runtime.Object type assertions
  • add events.k8s.io to events RBAC (kubebuilder markers, leader election role, hand-maintained helm leader-election template); the manager records events via events/v1 now
  • controller-tools v0.19.0 -> v0.21.0, setup-envtest release-0.24, wire the previously unused ENVTEST_VERSION variable into the install rule
  • regenerate CRDs, RBAC, webhook manifests and helm output; CRD churn is the k8s 1.34 -> 1.36 schema refresh, the webhook manifest diff is reordering only

Result{Requeue: true} is deprecated in v0.24 but still honored; migrating it to RequeueAfter changes 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=false idempotent.

Release Notes

None

@theyoprst theyoprst added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Jul 24, 2026
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.
@theyoprst theyoprst changed the title SCHED-2200: Update k8s libraries to v0.36 and controller-runtime to v0.24 SCHED-2200: Migrate to Go 1.26, update k8s libraries to v0.36 and controller-runtime to v0.24 Jul 24, 2026
@theyoprst theyoprst changed the title SCHED-2200: Migrate to Go 1.26, update k8s libraries to v0.36 and controller-runtime to v0.24 SCHED-2200: Update k8s libraries to v0.36 and controller-runtime to v0.24 Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant