Drop containerd by moving to helm v3.21.3 - #5174
Conversation
…rable containerd (#5100) containerd is not used by the operator. It arrives through one chain: pkg/render/istio -> helm.sh/helm/v3/pkg/action -> helm.sh/helm/v3/pkg/registry (helm's OCI client) -> github.com/containerd/containerd/remotes pkg/render/istio only uses helm as a local template renderer, so it never contacts a registry, but pkg/action imports pkg/registry unconditionally and containerd is linked in regardless. helm v3.21.3 replaced containerd's remotes with oras-go/v2, so moving to it removes containerd outright. (cherry picked from commit 3fce8ac) Conflicts: go.mod, go.sum This branch is the furthest behind of the three, so the pick carries the most with it. Two things beyond the version bump: 1. A Go toolchain lift. helm v3.21.3 declares `go 1.26.0` and this branch builds with Go 1.25.7, so `go mod tidy` refuses: helm.sh/helm/v3@v3.21.3 requires go >= 1.26.0 (running go 1.25.7; GOTOOLCHAIN=local) GO_BUILD_VER stays at 1.25.7 — the image does not change. Instead CONTAINERIZED gains `-e GOTOOLCHAIN=go1.26.4+auto`, letting the container fetch the newer toolchain, and go.mod's directive moves to `go 1.26.0`. This is the same arrangement release-v1.40 already uses. 2. A two-minor k8s jump. helm v3.21.3 requires client-go v0.36.2, and controller-runtime must move with it: | | before | after | |---|---|---| | helm | v3.19.5 | v3.21.3 | | controller-runtime | v0.22.5 | v0.24.1 | | k8s.io/{api,client-go,apimachinery,apiserver,apiextensions-apiserver,kube-aggregator} | v0.34.3 | v0.36.2 | | oras-go/v2 | v2.6.0 | v2.6.2 | | containerd | v1.7.29 + 3 more | gone | oras-go goes to v2.6.2 rather than the v2.6.1 that tidy selects, to match the CVE-2026-50151 / CVE-2026-50163 pin on the other branches. These cannot be split into separate buildable commits: k8s.io/api v0.36 removed scheduling/v1alpha1, which helm v3.19.5's k8s.io/kubectl still imports, and controller-runtime v0.22.5 does not support client-go v0.36. No code changes were needed despite the two-minor controller-runtime jump. Verified: - go build ./... passes under Go 1.26.4; containerd drops to 0 linked packages and leaves go.mod entirely. - go test ./pkg/render/istio/... (the only helm consumer) passes. - go test ./pkg/... behaves identically to pristine release-v1.41: every package passes on both except pkg/controller/installation, which hits go test's default 600s timeout on both trees alike. CI runs ginkgo, not go test, so that timeout is an artifact of the local invocation.
There was a problem hiding this comment.
Pull request overview
This PR updates the operator’s Go module graph to remove the vulnerable github.com/containerd/containerd dependency by upgrading Helm to v3.21.3 (and aligning required Kubernetes/controller-runtime versions), and adjusts the containerized build to use an auto-fetched Go 1.26 toolchain to satisfy Helm’s go 1.26 requirement.
Changes:
- Add
GOTOOLCHAIN=go1.26.4+autoto the containerized build environment in the Makefile. - Lift
go.mod’sgodirective to1.26.0and bump Helm tov3.21.3. - Align transitive dependency floors (notably
k8s.io/*tov0.36.2andcontroller-runtimetov0.24.1) and updatego.sumaccordingly.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Makefile | Sets GOTOOLCHAIN for containerized builds so the build image can fetch Go 1.26 automatically. |
| go.mod | Raises the Go directive to 1.26 and bumps Helm + required k8s/controller-runtime versions to match. |
| go.sum | Refreshes checksums for the new dependency graph and removes github.com/containerd/containerd sums. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Closing in favour of #5176. This PR needed Go 1.26 on a branch that builds with Go 1.25.7, and we do not want to move release-v1.41 to Go 1.26. The CI failure made the cost concrete: There is no smaller helm that achieves the containerd removal: v3.21.3 is the only containerd-free release and every helm from v3.21.1 on declares #5176 instead takes everything that is reachable under Go 1.25 — oras-go v2.6.0 → v2.6.2 (10 advisories → 0), helm v3.19.5 → v3.20.2 (chart extraction path traversal), containerd v1.7.29 → v1.7.34, and the k8s/controller-runtime floor those require. containerd stays, with three CRI-checkpoint advisories that only the helm v3.21.3 route can clear. |
Description
Cherry-pick of master's
3fce8aca0("chore(deps): bump helm to v3.21.3 and oras-go to v2.6.2 to drop vulnerable containerd", #5100), to remove containerd from the operator on this branch instead of bumping it again.containerd isn't used here. It arrives via
pkg/render/istio→ helm'spkg/action→ helm's OCIpkg/registry→containerd/remotes. That render code only uses helm as a local template renderer — it never contacts a registry — butpkg/actionimportspkg/registryunconditionally, so containerd is linked into the binary on a path nothing can reach. helm v3.21.3 swapped containerd fororas-go/v2, so moving to it drops containerd entirely.This branch is the furthest behind of the three, so this is the heaviest of the set. Reviewers should weigh it on that basis rather than by analogy to the v1.42 pick.
1. It needs a Go toolchain lift
helm v3.21.3 declares
go 1.26.0; this branch builds with Go 1.25.7, sogo mod tidyrefuses outright:There is no way around this by picking a lower helm — v3.21.3 is the only containerd-free release, and everything from v3.21.1 up requires Go 1.26:
GO_BUILD_VERand the build image do not change. InsteadCONTAINERIZEDgains one line —-e GOTOOLCHAIN=go1.26.4+auto— letting the container fetch the newer toolchain, andgo.mod's directive moves togo 1.26.0. This is the same arrangement release-v1.40 already runs (it builds with the Go 1.25.12 image and ago 1.26.5directive), so it's an established pattern on a release branch, not a new one.2. It's a two-minor k8s jump
helm v3.21.3 requires client-go v0.36.2, and controller-runtime has to move with it:
oras-gogoes to v2.6.2 rather than the v2.6.1 tidy selects, to match the CVE-2026-50151 / CVE-2026-50163 pin the other branches carry.These can't be split into separate buildable commits: k8s.io/api v0.36 removed
scheduling/v1alpha1, which helm v3.19.5'sk8s.io/kubectlstill imports, and controller-runtime v0.22.5 doesn't support client-go v0.36.Verified
go build ./...passes under Go 1.26.4. No code changes were needed, despite the two-minor controller-runtime jump.go.modentirely.go test ./pkg/render/istio/...(the only helm consumer) passes.go test ./pkg/...behaves identically to pristine release-v1.41: every package passes on both trees exceptpkg/controller/installation, which hitsgo test's default 600s timeout on both alike. CI runs ginkgo rather thango test, so that timeout is an artifact of the local invocation, not a regression. Diffed against a clean checkout of the branch.Companion PRs
If the Go toolchain lift isn't wanted on this branch, the alternative is to keep bumping containerd here as advisories land — it's unreachable code, so exposure is limited either way. That's a reasonable call to make for v1.41 specifically, and it doesn't affect the other two PRs.
Release Note