Skip to content

Develop -> main CAPI 1.13, K8s 1.35, Go 1.26 - #127

Open
hrak wants to merge 10 commits into
mainfrom
develop
Open

Develop -> main CAPI 1.13, K8s 1.35, Go 1.26#127
hrak wants to merge 10 commits into
mainfrom
develop

Conversation

@hrak

@hrak hrak commented Aug 27, 2026

Copy link
Copy Markdown
Member

Issue #, if available:

Description of changes:

  • Update CAPI to 1.13.5
  • Update K8s deps to 0.35.8
  • Update to Go 1.26

Testing performed:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

hrak and others added 10 commits August 14, 2026 16:47
Cluster API v1.13 raises the floor for Go (1.25.x), controller-runtime
(v0.23.x) and the Kubernetes libraries (v1.35.x), so this bump pulls in
the controller-runtime v0.23 API changes as well.

controller-runtime v0.23 makes the webhook builder generic: For() is
gone and the type is passed to NewWebhookManagedBy instead, while
WithValidator now takes the typed admission.Validator[T]. The four
webhooks in api/v1beta3 move to typed ValidateCreate/Update/Delete
receivers, which drops the runtime.Object type assertions and their
NewBadRequest branches.

recorder.Provider.GetEventRecorderFor is deprecated in favour of
GetEventRecorder, which returns a client-go events.EventRecorder. The
controllers switch to that type, the Eventf call sites gain the new
related and action arguments, and the manager role gains RBAC on the
events.k8s.io API group.

Also aligns the tool pins with CAPI v1.13.5 (envtest 1.36.0,
setup-envtest release-0.23, controller-gen v0.20.0, conversion-gen
v0.35.0), bumps the --kube-api-qps/--kube-api-burst defaults to 100/200
as recommended for providers, and updates the e2e config to v1.13.5 with
cert-manager v1.21.0 -> v1.21.1.

Unrelated to the bump, e2e_suite_test.go called E2EConfig.GetVariable,
which no longer exists upstream and had left the test/e2e module unable
to compile. Those three call sites now use MustGetVariable, in line with
the rest of the e2e suite.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
chore(deps): Update to CAPI 1.13.5
The release workflow had no Go setup step, so it used whatever Go the
runner image ships (currently 1.24.x). `go install pkg@version` selects
its toolchain from the tool's own go.mod, and mockgen v0.6.0 declares
`go 1.23.0`, so no toolchain switch happened and mockgen was linked
against go1.24's go/packages.

After go.mod moved to `go 1.25.0` in the CAPI 1.13.5 update, that mockgen
can no longer load our sources:

    package requires newer Go version go1.25 (application built with go1.24)

pr-check and go-coverage were unaffected because both already ran
setup-go, with a hardcoded '1.25'.

Follow the approach used by upstream CAPI: define GO_VERSION in the
Makefile and export GOTOOLCHAIN from it, so every go invocation under
make uses that exact toolchain, and expose `make go-version` so all three
workflows feed the same value to actions/setup-go.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Applies the same k8s.io/* bump already made in the root module to
hack/tools and test/e2e, so all three modules resolve the same
Kubernetes library versions.

The bumped set mirrors the root module exactly: api,
apiextensions-apiserver, apimachinery, apiserver, client-go and
component-base. k8s.io/cluster-bootstrap stays at v0.35.4 to match, and
no broad update was run, so no unrelated transitive drift is pulled in.
Most of these are indirect requirements in the two side modules, which
is unavoidable given neither has a direct dependency on the whole group.

google.golang.org/protobuf moves to the pseudo-version that k8s.io
v0.35.8 itself requires, matching the root module.

Also pins test/e2e to github.com/apache/cloudstack-go/v2 v2.17.1, the
same version the manager uses. This is a downgrade from v2.19.0: the
CloudStack deployments we test against are old enough that the newer
client is not representative, so the e2e suite should exercise the same
client version as the controller.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Brings test/e2e up to the versions the root module already uses, ginkgo
v2.28.3 and gomega v1.40.0. The Makefile derives GINGKO_VER from the
root go.mod, so the runner was already built from v2.28.3 while the e2e
module compiled against v2.28.1.

github.com/google/pprof moves to a newer pseudo-version as a
requirement of ginkgo v2.28.3.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
chore(deps): Bump the k8s.io group to v0.35.8 and sync module versions
ubuntu-22.04 is deprecated. Move to 24.04, which is what ubuntu-latest
currently points at. 26.04 is still marked preview by
actions/runner-images, so hold off on it for now.
Bump the go directive to 1.26.0 in all three modules (root, hack/tools,
test/e2e) and the pinned toolchain to 1.26.7.

Also make `make modules` tidy the test/e2e module, which was previously
left out.

golangci-lint v2.13.1 ships a staticcheck that prints package paths
without quotes and reports deprecated struct fields by type rather than
by expression, so both existing SA1019 exclusions for the CAPI v1beta1
deprecations stopped matching. Widen the regexes to accept either form.
Preallocate crdMigratorSkipPhases for the new prealloc finding.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
make's `export` does not reach $(shell ...) calls evaluated at parse
time, so `go list -m` (via get_go_version) and the `go env` lookups ran
with GOTOOLCHAIN=auto rather than the pinned GOTOOLCHAIN. With the go
directive now at 1.26.0, that made every make invocation download a
go1.26.0 toolchain into GOMODCACHE.

In CI this broke the Lint job: `make go-version` runs before
actions/setup-go, so the stray toolchain landed in GOMODCACHE first and
setup-go's cache restore then failed with `tar: Cannot open: File
exists`. Without a warm module cache, building golangci-lint from source
re-downloaded and sumdb-verified its whole dependency tree, which kept
hitting sum.golang.org HTTP/2 INTERNAL_ERROR.

These lookups do not need the module's own toolchain, so pin them to
GOTOOLCHAIN=local.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Update to Go 1.26 and pin the CI toolchain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants