Skip to content

chore(platform): raise Go toolchain to 1.26 across first-party images - #2941

Merged
Aleksei Sviridkin (lexfrei) merged 4 commits into
mainfrom
chore/go-toolchain-1.26-sweep
Jun 25, 2026
Merged

Aleksei Sviridkin (lexfrei) merged 4 commits into
mainfrom
chore/go-toolchain-1.26-sweep

Conversation

@lexfrei

@lexfrei Aleksei Sviridkin (lexfrei) commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

Completes the Go-toolchain modernization for first-party images — the build-time counterpart to #2852, which raised the root and api/ modules to Go 1.26.4.

  1. First-party image Go modules → go 1.26.4 (token-proxy, kube-ovn-webhook, kubevirt-csi-driver): raise the go directive and refresh dependencies. kube-ovn-webhook moves k8s.io/* 0.26 → 0.36.2 (only long-stable admission/core API is used); kubevirt-csi-driver keeps its existing replace-based k8s alignment at 0.36.0 (main's refactor owns that module's pin) and raises the go directive, with the golang.org/x/net 0.56.0 security bump — which clears the reachable GO-2026-5026 — reapplied. Adds two .gitignore files so the locally-built binaries can't be committed.
  2. Go builder images → golang:1.26 across 8 images still on EOL/behind toolchains (golang 1.20, 1.20.6, 1.23.4, 1.24, 1.25): cluster-autoscaler, kubevirt-cloud-provider, redis-operator, multus-cni, keycloak-operator, objectstorage, kilo, linstor-csi. The builder image tag — not the go.mod minimum — sets the standard-library version baked into the binary, so these still shipped unpatched stdlib on a plain rebuild.

Verified: GOOS=linux go build/go vet pass for all three modules and go mod tidy is a no-op; the three biggest builder jumps (redis-operator, kubevirt-cloud-provider, cluster-autoscaler — all formerly Go 1.20.x/1.23.x) were verified with a local docker build; the remaining five (1.24/1.25 → 1.26) are covered by CI image builds.

Release note

chore(platform): raise the Go toolchain to 1.26 across first-party images to clear standard-library security advisories

Summary by CodeRabbit

  • Chores
    • Updated several container build environments to a newer Go release for consistency across Kubernetes-related components.
    • Refreshed module and dependency versions in a few services to keep builds current.
    • Expanded ignore rules for generated image artifacts so build outputs aren’t tracked.

@github-actions github-actions Bot added area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review kind/cleanup Categorizes issue or PR as related to cleanup of code, process, or technical debt size/L This PR changes 100-499 lines, ignoring generated files labels Jun 17, 2026
@coderabbitai

coderabbitai Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 94777f10-03aa-4dff-8825-c5d0b388faa7

📥 Commits

Reviewing files that changed from the base of the PR and between 1fc269e and d09d52e.

⛔ Files ignored due to path filters (3)
  • packages/apps/kubernetes/images/kubevirt-csi-driver/go.sum is excluded by !**/*.sum
  • packages/system/dashboard/images/token-proxy/go.sum is excluded by !**/*.sum
  • packages/system/kubeovn-webhook/images/kubeovn-webhook/go.sum is excluded by !**/*.sum
📒 Files selected for processing (12)
  • packages/apps/kubernetes/.gitignore
  • packages/apps/kubernetes/images/cluster-autoscaler/Dockerfile
  • packages/apps/kubernetes/images/kubevirt-cloud-provider/Dockerfile
  • packages/apps/kubernetes/images/kubevirt-csi-driver/go.mod
  • packages/system/dashboard/images/token-proxy/go.mod
  • packages/system/keycloak-operator/images/keycloak-operator/Dockerfile
  • packages/system/kilo/images/kilo/Dockerfile
  • packages/system/kubeovn-webhook/.gitignore
  • packages/system/kubeovn-webhook/images/kubeovn-webhook/go.mod
  • packages/system/linstor/images/linstor-csi/Dockerfile
  • packages/system/objectstorage-controller/images/objectstorage/Dockerfile
  • packages/system/redis-operator/images/redis-operator/Dockerfile
✅ Files skipped from review due to trivial changes (6)
  • packages/apps/kubernetes/.gitignore
  • packages/system/kubeovn-webhook/.gitignore
  • packages/system/dashboard/images/token-proxy/go.mod
  • packages/system/objectstorage-controller/images/objectstorage/Dockerfile
  • packages/apps/kubernetes/images/cluster-autoscaler/Dockerfile
  • packages/system/keycloak-operator/images/keycloak-operator/Dockerfile
🚧 Files skipped from review as they are similar to previous changes (5)
  • packages/system/redis-operator/images/redis-operator/Dockerfile
  • packages/system/kilo/images/kilo/Dockerfile
  • packages/apps/kubernetes/images/kubevirt-cloud-provider/Dockerfile
  • packages/system/kubeovn-webhook/images/kubeovn-webhook/go.mod
  • packages/apps/kubernetes/images/kubevirt-csi-driver/go.mod

📝 Walkthrough

Walkthrough

Go builder stage base images are bumped to golang:1.26 across seven Dockerfiles in packages/apps and packages/system. Corresponding go.mod files are updated to Go toolchain 1.26.4, with k8s.io/* direct dependencies advanced to v0.36.2 in kubeovn-webhook and golang.org/x/* indirect modules bumped project-wide. Two .gitignore files gain entries for compiled binary outputs.

Changes

Go 1.26 Toolchain Upgrade

Layer / File(s) Summary
Dockerfile builder stage Go 1.26 bumps
packages/apps/kubernetes/images/cluster-autoscaler/Dockerfile, packages/apps/kubernetes/images/kubevirt-cloud-provider/Dockerfile, packages/system/keycloak-operator/images/keycloak-operator/Dockerfile, packages/system/kilo/images/kilo/Dockerfile, packages/system/linstor/images/linstor-csi/Dockerfile, packages/system/objectstorage-controller/images/objectstorage/Dockerfile, packages/system/redis-operator/images/redis-operator/Dockerfile
Builder stage FROM image tags updated to golang:1.26 across all affected Dockerfiles, from prior versions ranging from 1.20 to 1.25.
go.mod toolchain and dependency updates
packages/apps/kubernetes/images/kubevirt-csi-driver/go.mod, packages/system/dashboard/images/token-proxy/go.mod, packages/system/kubeovn-webhook/images/kubeovn-webhook/go.mod
go directive bumped to 1.26.4; direct k8s.io/api, k8s.io/apimachinery, k8s.io/client-go advanced from v0.26.0 to v0.36.2; lestrrat-go/jwx suite bumped; golang.org/x/* and other indirect modules refreshed, including sigs.k8s.io/structured-merge-diff moving from v4 to v6.
.gitignore entries for compiled binaries
packages/apps/kubernetes/.gitignore, packages/system/kubeovn-webhook/.gitignore
Added ignore patterns for images/kubevirt-csi-driver/kubevirt-csi-driver, images/kubeovn-webhook/kube-ovn-webhook/, and images/kubeovn-webhook/webhook/.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Suggested reviewers

  • kvaps
  • lllamnyp
  • androndo
  • IvanHunters
  • sircthulhu

Poem

🐇 Hop, hop, the gopher leaps to 1.26,
Old builder images swapped with a few quick flicks.
The mod files aligned, their versions in tune,
k8s dependencies dancing 'neath a June moon.
Ignore files grown tidy, no binaries stray —
A fresher toolchain to brighten the day! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: upgrading the Go toolchain to 1.26 across first-party images.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/go-toolchain-1.26-sweep

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lexfrei
Aleksei Sviridkin (lexfrei) marked this pull request as ready for review June 17, 2026 11:40
@dosubot dosubot Bot added the area/build Issues or PRs related to image build infrastructure, multi-arch support label Jun 17, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request completes the modernization of the Go toolchain across all first-party images, aligning them with Go 1.26.4. This update is crucial for clearing standard-library security advisories and ensuring that all components are built with a current and supported Go version. The changes involve updating go.mod files for specific modules to reflect the new Go version and refreshing their dependencies, as well as updating Dockerfiles to use the golang:1.26 builder image for several applications.

Highlights

  • Go Toolchain Update: The Go toolchain version has been raised to 1.26.4 for first-party Go modules and to 1.26 for builder images, completing the modernization effort.
  • Dependency Refresh: Various Go module dependencies were updated, including Kubernetes API versions for kube-ovn-webhook (0.26 to 0.36.2) and kubevirt-csi-driver (0.36.0 to 0.36.2), along with other indirect dependencies like golang.org/x/net.
  • Security Advisories Addressed: Updating the Go versions helps clear standard-library security advisories, particularly for images previously built with older or end-of-life Go toolchains.
  • Build Artifact Management: New .gitignore entries were added for kubevirt-csi-driver and kube-ovn-webhook to prevent locally-built binaries from being committed.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment Gemini (@gemini-code-assist) Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/system/kubeovn-webhook/.gitignore`:
- Line 1: The .gitignore entry references kube-ovn-webhook but the Dockerfile in
packages/system/kubeovn-webhook/images/kubeovn-webhook/Dockerfile actually
builds a binary named webhook. Update the .gitignore entry from
images/kubeovn-webhook/kube-ovn-webhook to images/kubeovn-webhook/webhook to
match the actual build artifact filename so it will be properly ignored by git.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 95a2ae00-adf7-4621-93a6-a61af1163255

📥 Commits

Reviewing files that changed from the base of the PR and between 8c411d8 and 38967e0.

⛔ Files ignored due to path filters (3)
  • packages/apps/kubernetes/images/kubevirt-csi-driver/go.sum is excluded by !**/*.sum
  • packages/system/dashboard/images/token-proxy/go.sum is excluded by !**/*.sum
  • packages/system/kubeovn-webhook/images/kubeovn-webhook/go.sum is excluded by !**/*.sum
📒 Files selected for processing (13)
  • packages/apps/kubernetes/.gitignore
  • packages/apps/kubernetes/images/cluster-autoscaler/Dockerfile
  • packages/apps/kubernetes/images/kubevirt-cloud-provider/Dockerfile
  • packages/apps/kubernetes/images/kubevirt-csi-driver/go.mod
  • packages/system/dashboard/images/token-proxy/go.mod
  • packages/system/keycloak-operator/images/keycloak-operator/Dockerfile
  • packages/system/kilo/images/kilo/Dockerfile
  • packages/system/kubeovn-webhook/.gitignore
  • packages/system/kubeovn-webhook/images/kubeovn-webhook/go.mod
  • packages/system/linstor/images/linstor-csi/Dockerfile
  • packages/system/multus/images/multus-cni/Dockerfile
  • packages/system/objectstorage-controller/images/objectstorage/Dockerfile
  • packages/system/redis-operator/images/redis-operator/Dockerfile

Comment thread packages/system/kubeovn-webhook/.gitignore
@lexfrei
Aleksei Sviridkin (lexfrei) force-pushed the chore/go-toolchain-1.26-sweep branch from 38967e0 to 80c83ec Compare June 22, 2026 15:36
@lexfrei
Aleksei Sviridkin (lexfrei) marked this pull request as draft June 23, 2026 11:34
@lexfrei
Aleksei Sviridkin (lexfrei) force-pushed the chore/go-toolchain-1.26-sweep branch from 80c83ec to 1fc269e Compare June 23, 2026 11:47
@lexfrei
Aleksei Sviridkin (lexfrei) marked this pull request as ready for review June 23, 2026 11:47

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Go builder image version to 1.26 across multiple Dockerfiles (including cluster-autoscaler, kubevirt-cloud-provider, keycloak-operator, kilo, linstor-csi, multus-cni, objectstorage, and redis-operator). It also bumps the Go version to 1.26.4 and updates various dependencies in several go.mod files, notably upgrading Kubernetes client libraries to v0.36.2 in kubeovn-webhook. Feedback points out that the commit or PR scope 'deps' is invalid according to the repository style guide, and suggests using a valid scope such as 'platform' or package-specific scopes.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@@ -1,5 +1,5 @@
# Source: https://raw.githubusercontent.com/kubernetes/autoscaler/refs/heads/master/cluster-autoscaler/Dockerfile.amd64
ARG builder_image=docker.io/library/golang:1.23.4
ARG builder_image=docker.io/library/golang:1.26

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

low

According to the repository style guide (Commit and PR Requirements), the scope 'deps' used in the PR title and release notes is not a valid scope. Please update the PR title and release notes to use a valid scope, such as 'platform' (which is a valid System scope), or split the changes into multiple commits with package-specific scopes (e.g., 'kubernetes', 'dashboard', 'kilo', etc.). Valid scopes include: System (dashboard, platform, cilium, kube-ovn, linstor, fluxcd, cluster-api), Apps (postgres, mariadb, redis, kafka, clickhouse, kubernetes, virtual-machine), Meta (api, hack, tests, ci, docs), or any package-specific name matching a directory under packages/.

References
  1. Each commit must follow Conventional Commits format: type(scope): brief description. Valid scopes are strictly defined in the repository style guide. Flag any PR whose commits lack the Conventional Commits format. (link)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Switched the PR title and release-note scope from deps to platform. deps is not in the styleguide's valid-scope list (.gemini/styleguide.md:42) and the labeler has no deps → area/* mapping, so it fell back to area/uncategorized. platform is the valid System catch-all for this cross-cutting first-party-image toolchain sweep and maps to area/platform.

The token-proxy, kube-ovn-webhook and kubevirt-csi-driver image modules
still pinned go 1.26.2, so their binaries shipped standard-library
versions that the 1.26.4 toolchain fixes. Raise the go directive and
refresh module dependencies to current releases.

token-proxy and kube-ovn-webhook take a full dependency refresh;
kube-ovn-webhook also moves k8s.io/* from 0.26.0 to 0.36.2 (only
long-stable admission/core API is used, so no code change is needed).
kubevirt-csi-driver keeps its existing replace-based k8s.io/* alignment
at 0.36.0 and only raises the go directive; a blanket go get -u is
avoided there because it pulls transitive bumps that break compilation
of the pinned vendored upstream csi-driver source.

Also ignore the locally-built binaries under the two image directories so
they cannot be committed by accident.

Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
Several first-party images still built their Go binaries with EOL or
behind-latest toolchains (golang 1.20, 1.20.6, 1.23.4, 1.24, 1.25), so a
plain rebuild kept shipping standard-library versions that the current
1.26 toolchain fixes. Raise every Go builder image (FROM and the
builder_image ARG defaults) to golang:1.26 across cluster-autoscaler,
kubevirt-cloud-provider, redis-operator, multus-cni, keycloak-operator,
objectstorage, kilo and linstor-csi.

This is the build-time counterpart to raising the go directive in the
first-party Go modules: the toolchain that compiles the binary, not the
go.mod minimum, determines the standard-library version baked into the
image.

Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
A local `go build` emits the module-named binary (kube-ovn-webhook),
while the Dockerfile builds `-o webhook`. Ignore both names so neither
local binary is accidentally committed.

Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
Clear the reachable GO-2026-5026 advisory: idna.ToASCII is reached
through the KubeVirt client path, and the fix landed in x/net v0.55.0.
Bump to v0.56.0, pulling x/sys, x/term and x/text forward as required;
govulncheck then reports the module clean.

Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
@lexfrei
Aleksei Sviridkin (lexfrei) force-pushed the chore/go-toolchain-1.26-sweep branch from 1fc269e to d09d52e Compare June 24, 2026 12:49
@lexfrei Aleksei Sviridkin (lexfrei) changed the title chore(deps): raise Go toolchain to 1.26 across first-party images chore(platform): raise Go toolchain to 1.26 across first-party images Jun 24, 2026
@github-actions github-actions Bot added the area/platform Issues or PRs related to platform infrastructure (bundle, flux, talos, installer) label Jun 24, 2026

@myasnikovdaniil myasnikovdaniil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM — build-time toolchain sweep; all three refreshed Go modules build/vet/tidy clean on Go 1.26.4 and CI is green (the image Build and E2E jobs exercise the new dependencies).

Business context: Build-time counterpart to #2852 — moves 7 first-party Dockerfile builders to golang:1.26 and refreshes three in-image Go modules (token-proxy, kube-ovn-webhook, kubevirt-csi-driver) to go 1.26.4 with patched golang.org/x/* and k8s deps, so rebuilt binaries bake in the patched standard library instead of shipping unpatched stdlib on a plain rebuild.

Verified locally (Go 1.26.4, matching the go directive):

  • go build ./..., go vet ./..., and go mod tidy -diff are clean / no-op for all three modules — confirms the "tidy is a no-op" claim.
  • The kube-ovn-webhook k8s.io/* 0.26 → 0.36.2 jump is safe: the source only uses long-stable surface (admission/v1 AdmissionReview/AdmissionResponse/PatchTypeJSONPatch, core/v1.Pod, metav1.GetOptions, client-go CoreV1().Namespaces().Get + rest). Compiles and vets unchanged.
  • All three modules already build on golang:1.26, so the go 1.26.4 directive matches the builder — no mismatch.
  • Post-PR, every first-party Go builder is on golang:1.26[-alpine] (only the pre-existing s3manager uses the looser golang:1); nothing is left behind on 1.20/1.23/1.24/1.25.

Non-blocking:

  1. The description lists multus-cni among the bumped builders, but its Dockerfile is already on golang:1.26 on main and isn't in this diff — the sweep touches 7 Dockerfiles, not 8. Worth trimming so the release note matches what shipped.
  2. kubevirt-cloud-provider (1.20.6) and cluster-autoscaler (1.23.4) move from patch-pinned to floating golang:1.26. Consistent with the rest of the repo and the right call for auto-absorbing stdlib patches — just noting the reproducibility trade-off.

@lexfrei
Aleksei Sviridkin (lexfrei) merged commit baf47ce into main Jun 25, 2026
22 of 25 checks passed
@lexfrei
Aleksei Sviridkin (lexfrei) deleted the chore/go-toolchain-1.26-sweep branch June 25, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Issues or PRs related to image build infrastructure, multi-arch support area/platform Issues or PRs related to platform infrastructure (bundle, flux, talos, installer) area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review kind/cleanup Categorizes issue or PR as related to cleanup of code, process, or technical debt size/L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants