Skip to content

🌱 build: update the builder image to Go 1.26 - #348

Merged
jschoone merged 2 commits into
mainfrom
chore/builder-go-1.26
Nov 6, 2026
Merged

jschoone merged 2 commits into
mainfrom
chore/builder-go-1.26

Conversation

@jschoone

@jschoone jschoone commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Needed for newer CAPI versions later

The builder image could not be built from the Dockerfile anymore: Wolfi only keeps current
package versions, so clusterctl (removed), controller-gen, kind and trivy failed with
"unable to select packages" because of their pinned versions.

- Go 1.26.10 on bookworm (there is no bullseye image for Go 1.26). pip needs
  --break-system-packages there (PEP 668).
- golangci-lint v2.10.1. It has to be built with Go >= 1.26 to work with the Go 1.26 standard
  library; v2.4.0 (built with Go 1.25) panics with "file requires newer Go version go1.26".
  v2.15.0 is not used: its tarball did not match the checksum of the release in install.sh.
- controller-gen v0.23.0, kind v0.33.0 and trivy v0.70.0, the versions Wolfi has now. The
  CRDs in the repository are generated with the controller-gen of the Makefile (v0.16.2), not
  with this one.
- clusterctl v1.14.3, downloaded from the GitHub release in its own stage as it is not in
  Wolfi anymore. It is only copied to hack/tools/bin for local use (BINARIES in the Makefile,
  the quickstart uses clusterctl init); no target and no test calls it. The CSO moves to
  Cluster API 1.13 and 1.14. Installing Cluster API 1.11 or 1.12 with it is not checked.

Built locally with podman and checked: go 1.26.10, golangci-lint 2.10.1, clusterctl 1.14.3,
controller-gen 0.23.0, helm 3.19.0, kind 0.33.0, kubectl 1.34.13, kustomize 5.7.1,
trivy 0.70.0, lychee, hadolint, yamllint, yamlfixer.

Not part of this commit: the new image has to be built and pushed with
hack/upgrade-builder-image.sh (make builder-image-push). Only then .builder-image-version.txt
and the image tags in the workflows can be updated.

golangci-lint v2.10.1 reports 15 new findings in the existing code (gosec G602/G703/G704,
noctx, prealloc, revive enforce-switch-style and var-naming). They have to be fixed or excluded
before the image is used by the CI, otherwise the lint job fails.

Signed-off-by: Jan Schoone <6106846+jschoone@users.noreply.github.com>
@jschoone jschoone changed the title 🌱 build: update the builder image to Go 1.26 🌱 build: update the builder image to Go 1.26 Nov 6, 2026
make test-unit fails in the CI: the setup-envtest pinned in the Makefile (June 2023) downloads the
test binaries from the Google Cloud Storage bucket kubebuilder-tools, which answers with
401/403 now:

  unable to fetch checksum for requested version: unable fetch metadata for
  kubebuilder-tools-1.29.3-linux-amd64.tar.gz -- got status "401 Unauthorized" from GCS

KUBEBUILDER_ASSETS stays empty and the controller suite fails with
exec: "etcd": executable file not found in $PATH.

Use setup-envtest@release-0.21, as the migration branch already does. It downloads from the
new location and still provides Kubernetes 1.29.3. Checked: with the old pin every version
fails with 401, with release-0.21 setup-envtest use 1.29.3 and 1.33.0 work.

Signed-off-by: Jan Schoone <6106846+jschoone@users.noreply.github.com>
@jschoone
jschoone merged commit 1fd399c into main Nov 6, 2026
6 checks passed
@jschoone
jschoone deleted the chore/builder-go-1.26 branch November 6, 2026 14:13
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