chore(deps): upgrade to Kubernetes 1.36 and controller-runtime v0.24.1 - #170
Merged
Conversation
Upgrades controller-runtime to v0.24.1 and the k8s.io/* modules to v0.36.1 in a single change. controller-runtime v0.24 is built against k8s.io/* v0.36, so upgrading either alone produces a pairing that is not in the compatibility matrix and that nothing tests. controller-runtime v0.24 declares go 1.26.0, so the framework's minimum Go version rises from 1.25 to 1.26. This applies to every row of the matrix: pinning older dependencies with replace directives does not lower the framework's own Go requirement. client-go v0.36 makes EventRecorder.Eventf a recognised printf wrapper, which go vet rejects at four call sites that passed an already-formatted string as the format argument. Beyond the vet failure, that form re-interprets any % in the interpolated values as a verb, and RecordApplyOperationEvent reaches it with caller-supplied key/value pairs, so a pair like progress=50% was emitted as progress=50%!,(MISSING). The pre-formatted message is now recorded with Event, the remaining three sites pass real format arguments, and the corruption is covered by a regression test. Kubernetes 1.36 requires the kubeadm v1beta4 config format, which only kind 0.32.0 emits, so the E2E node image bump is accompanied by a kind toolchain bump. Renovate now groups controller-runtime with the k8s.io/* modules so this pair cannot split across separate pull requests again. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01A2fRr3d9JEsnNcqmkZsahz
1 task
1 task
There was a problem hiding this comment.
Pull request overview
This PR updates the framework’s primary dependency/version combination to Kubernetes 1.36 by upgrading controller-runtime to v0.24.1 and aligning k8s.io/* modules to v0.36.1, along with the associated Go/tooling, CI, documentation, and event-recording adjustments required by the new dependency set.
Changes:
- Upgrades
sigs.k8s.io/controller-runtimetov0.24.1andk8s.io/{api,apimachinery,client-go,apiextensions-apiserver}tov0.36.1, and raises the module minimum to Go1.26.0. - Fixes event recording call sites to use true format strings for
Eventf, and switches one call site toEventto avoid%-verb reinterpretation for caller-supplied key/value pairs (with a regression test added). - Updates compatibility docs/plugin references, Renovate grouping, kind image/tool pins, and the compatibility workflow matrix for the new “current” dependency row.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| renovate.json | Groups controller-runtime with the k8s.io/* set to ensure compatible upgrades land together. |
| README.md | Updates stated minimum Go version and links to the compatibility matrix. |
| docs/compatibility.md | Moves primary matrix row to 1.36/0.36/0.24 and documents the Go 1.26 minimum rationale. |
| go.mod | Bumps Go directive to 1.26.0 and updates Kubernetes/controller-runtime module versions. |
| go.sum | Updates sums consistent with the upgraded module set. |
| pkg/recording/resource_event.go | Uses Event instead of Eventf for preformatted messages to avoid % formatting pitfalls. |
| pkg/recording/resource_event_test.go | Adds regression coverage for key/value pairs containing % sequences. |
| pkg/component/suspend.go | Updates Eventf usage to pass a format string + args (printf-wrapper compliance). |
| pkg/component/orphan.go | Updates Eventf usage to pass a format string + args (printf-wrapper compliance). |
| pkg/component/delete.go | Updates Eventf usage to pass a format string + args (printf-wrapper compliance). |
| .github/workflows/compatibility.yml | Adds a 0.24/0.36 “current” matrix row and demotes prior row(s) to non-current. |
| Makefile | Updates kind node image to Kubernetes 1.36.1 pinned by digest. |
| .tool-versions | Bumps kind tool version to 0.32.0 to support Kubernetes 1.36 clusters. |
| plugin/skills/structuring-operators/SKILL.md | Updates embedded compatibility table and Go minimum to match the new primary row. |
| plugin/skills/structuring-operators/references/compatibility.md | Syncs the compatibility reference content with docs/compatibility.md. |
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.
Description
Moves the framework's primary version combination to Kubernetes 1.36, upgrading
controller-runtimeto v0.24.1 and thek8s.io/*modules to v0.36.1 together. These arrived as two separate Renovate PRs (#154 and #101) that could not bemerged independently:
controller-runtimev0.24 is built againstk8s.io/*v0.36, so landing either one alone producesa pairing that is not in the compatibility matrix and that nothing tests. This PR does the whole upgrade in one step and
carries the source, CI, documentation and tooling changes it requires.
Changes
controller-runtimev0.23.3 to v0.24.1, andk8s.io/{api,apimachinery,client-go,apiextensions-apiserver}v0.35.x tov0.36.1.
controller-runtimev0.24, which declaresgo 1.26.0, and it applies to consumers on every row of the matrix: pinning older dependencies withreplacedirectives does not lower the framework's own Go requirement.
EventRecorder.Eventfcall sites now pass a real format string with arguments instead of a pre-formatted string.client-gov0.36 makesEventfa recognised printf wrapper, sogo vetrejects the old form.v0.24.x/v0.36.x/ Kubernetes 1.36, withv0.23.x/v0.35.xadded asTested.
v0.22.x/v0.34.xis retained, so no combination is dropped in this release.v1.31.0tov1.36.1, pinned by digest, and thekindtoolchain pin moves from0.31.0 to 0.32.0.
controller-runtimewith thek8s.io/*modules, so future upgrades of this pair arrive as asingle PR instead of splitting again.
Challenges
The
Eventfchanges are not purelygo vetappeasement. Passing an already-formatted string as the format argumentmeans any
%in the interpolated values gets re-interpreted as a verb.RecordApplyOperationEventtakes caller-suppliedmessageKeyValuePairs, so this was reachable through the public API: a pair likeprogress=50%was emitted asprogress=50%!,(MISSING). That path now has a regression test, and the pre-formatted message is recorded withEventrather than
Eventf.Bumping the kind node image also required bumping kind itself. Kubernetes 1.36 and later need the kubeadm
v1beta4config format, which only kind 0.32.0 emits, so the image bump alone would have produced a cluster that fails to come
up. The repository creates its E2E cluster with no config file and no versioned patches, so nothing else needed
migrating for
v1beta4.Related
controller-runtimev0.24.1), superseded by this PR.Testing
make allpasses: formatting, lint, the full unit and envtest suite, the scaffold tests, and the examples build. Theenvtest binary version and the
controller-runtimerelease branch used forsetup-envtestare both derived fromgo.mod, so they picked up 1.36 andrelease-0.24with no manual change.The new
pkg/recordingtest case was verified against the pre-fix code with vetting disabled, to confirm it actuallyreproduces the message corruption rather than just passing after the change.
The full E2E suite was run locally against a kind cluster on
kindest/node:v1.36.1, rather than a targeted subset,because the cluster version moved five minor releases and the client libraries changed at the same time.
The two downgrade rows of the matrix are not verified by the default CI run. This PR carries the
compatibilitylabelso the compatibility workflow runs and exercises
v0.23/v0.35andv0.22/v0.34against the changed source.