Skip to content

chore(deps): upgrade to Kubernetes 1.36 and controller-runtime v0.24.1 - #170

Merged
sourcehawk merged 1 commit into
mainfrom
chore/k8s-1.36-upgrade
Aug 2, 2026
Merged

chore(deps): upgrade to Kubernetes 1.36 and controller-runtime v0.24.1#170
sourcehawk merged 1 commit into
mainfrom
chore/k8s-1.36-upgrade

Conversation

@sourcehawk

Copy link
Copy Markdown
Owner

Description

Moves the framework's primary version combination to Kubernetes 1.36, upgrading controller-runtime to v0.24.1 and the
k8s.io/* modules to v0.36.1 together. These arrived as two separate Renovate PRs (#154 and #101) that could not be
merged independently: controller-runtime v0.24 is built against k8s.io/* v0.36, so landing either one alone produces
a 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-runtime v0.23.3 to v0.24.1, and k8s.io/{api,apimachinery,client-go,apiextensions-apiserver} v0.35.x to
    v0.36.1.
  • The minimum Go version rises from 1.25 to 1.26. This is inherited from controller-runtime v0.24, which declares
    go 1.26.0, and it applies to consumers on every row of the matrix: pinning older dependencies with replace
    directives does not lower the framework's own Go requirement.
  • Four EventRecorder.Eventf call sites now pass a real format string with arguments instead of a pre-formatted string.
    client-go v0.36 makes Eventf a recognised printf wrapper, so go vet rejects the old form.
  • Compatibility matrix moves to Primary v0.24.x / v0.36.x / Kubernetes 1.36, with v0.23.x / v0.35.x added as
    Tested. v0.22.x / v0.34.x is retained, so no combination is dropped in this release.
  • E2E kind node image moves from v1.31.0 to v1.36.1, pinned by digest, and the kind toolchain pin moves from
    0.31.0 to 0.32.0.
  • Renovate now groups controller-runtime with the k8s.io/* modules, so future upgrades of this pair arrive as a
    single PR instead of splitting again.

Challenges

The Eventf changes are not purely go vet appeasement. Passing an already-formatted string as the format argument
means any % in the interpolated values gets re-interpreted as a verb. RecordApplyOperationEvent takes caller-supplied
messageKeyValuePairs, so this was reachable through the public API: a pair like progress=50% was emitted as
progress=50%!,(MISSING). That path now has a regression test, and the pre-formatted message is recorded with Event
rather than Eventf.

Bumping the kind node image also required bumping kind itself. Kubernetes 1.36 and later need the kubeadm v1beta4
config 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

Testing

make all passes: formatting, lint, the full unit and envtest suite, the scaffold tests, and the examples build. The
envtest binary version and the controller-runtime release branch used for setup-envtest are both derived from
go.mod, so they picked up 1.36 and release-0.24 with no manual change.

The new pkg/recording test case was verified against the pre-fix code with vetting disabled, to confirm it actually
reproduces 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 compatibility label
so the compatibility workflow runs and exercises v0.23/v0.35 and v0.22/v0.34 against the changed source.

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
Copilot AI review requested due to automatic review settings August 2, 2026 18:51
@sourcehawk sourcehawk added the compatibility Runs the compatibility workflow against the full version matrix label Aug 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-runtime to v0.24.1 and k8s.io/{api,apimachinery,client-go,apiextensions-apiserver} to v0.36.1, and raises the module minimum to Go 1.26.0.
  • Fixes event recording call sites to use true format strings for Eventf, and switches one call site to Event to 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.

@sourcehawk
sourcehawk merged commit e6ccca3 into main Aug 2, 2026
10 checks passed
@sourcehawk
sourcehawk deleted the chore/k8s-1.36-upgrade branch August 2, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compatibility Runs the compatibility workflow against the full version matrix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants