Skip to content

chore: drop helm dependency and fork strvals#18272

Merged
k8s-ci-robot merged 2 commits into
kubernetes:masterfrom
hakman:drop-helm-dep
May 5, 2026
Merged

chore: drop helm dependency and fork strvals#18272
k8s-ci-robot merged 2 commits into
kubernetes:masterfrom
hakman:drop-helm-dep

Conversation

@hakman

@hakman hakman commented May 4, 2026

Copy link
Copy Markdown
Member

kops toolbox template only used helm for --set / --values parsing two narrow APIs from pkg/strvals and pkg/cli/values. The full helm.sh/helm/v3 module pulled in containerd, oras-go, and most of the helm chart machinery: ~43k lines of vendored code we never ran.

Migrating to helm v4 would have made this worse, not better: v4's plugin system runs WebAssembly, so the dep would have grown to include the Extism SDK, wazero, and a fresh crypto stack for OCI signing, none of which kOps touches.

Instead, fork helm.sh/helm/v3/pkg/strvals at v3.19.4 into third_party/forked/helmstrvals, following the convention from #18230. Trimmed to ParseInto / ParseIntoString; JSON, file, and literal value branches removed.

Impact

  • Source: 2 files, +22 / -22
  • New forked package: +709 (LICENSE + doc.go + parser + tests)
  • Vendor: 215 files deleted, ~43k lines
  • Drops helm.sh/helm/v3, containerd/{containerd,errdefs,log,platforms}, docker/go-events, oras.land/oras-go/v2

Assisted by Claude Opus

/cc @rifelpet @justinsb

@k8s-ci-robot k8s-ci-robot requested review from justinsb and rifelpet May 4, 2026 22:53
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 4, 2026
@hakman

hakman commented May 4, 2026

Copy link
Copy Markdown
Member Author

/test pull-kops-e2e-k8s-aws-calico

@rifelpet

rifelpet commented May 5, 2026

Copy link
Copy Markdown
Member

/lgtm

nice find, any noticeable impact on binary size?

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 5, 2026
@hakman

hakman commented May 5, 2026

Copy link
Copy Markdown
Member Author

nice find, any noticeable impact on binary size?

sadly, just 1MB.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 5, 2026
@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 5, 2026
@hakman

hakman commented May 5, 2026

Copy link
Copy Markdown
Member Author

/approve
/cc @ameukam

@k8s-ci-robot k8s-ci-robot requested a review from ameukam May 5, 2026 05:11
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 5, 2026
hakman added 2 commits May 5, 2026 08:21
Trimmed in-tree copy of helm's strvals parser at v3.19.4. Only ParseInto
and ParseIntoString are kept; the JSON, file, and literal value branches
along with their unused public APIs are removed. github.com/pkg/errors
is replaced with stdlib errors and fmt.Errorf("%w").
Replaces helm.sh/helm/v3/pkg/strvals and helm.sh/helm/v3/pkg/cli/values
with the in-tree fork at third_party/forked/helmstrvals plus a small
inline mergeMaps for value-file loading.

Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
@hakman hakman changed the title Drop helm dependency and fork strvals chore: drop helm dependency and fork strvals May 5, 2026
@ameukam

ameukam commented May 5, 2026

Copy link
Copy Markdown
Member

/lgtm

I'm a little surprised by the helm 4 dependency tree.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 5, 2026
@k8s-ci-robot k8s-ci-robot merged commit 48f41f4 into kubernetes:master May 5, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants