chore: drop helm dependency and fork strvals#18272
Merged
Merged
Conversation
Member
Author
|
/test pull-kops-e2e-k8s-aws-calico |
Member
|
/lgtm nice find, any noticeable impact on binary size? |
Member
Author
sadly, just 1MB. |
Member
Author
|
/approve |
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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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>
Member
|
/lgtm I'm a little surprised by the helm 4 dependency tree. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
kops toolbox templateonly used helm for--set/--valuesparsing two narrow APIs frompkg/strvalsandpkg/cli/values. The fullhelm.sh/helm/v3module 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/strvalsatv3.19.4intothird_party/forked/helmstrvals, following the convention from #18230. Trimmed toParseInto/ParseIntoString; JSON, file, and literal value branches removed.Impact
helm.sh/helm/v3,containerd/{containerd,errdefs,log,platforms},docker/go-events,oras.land/oras-go/v2Assisted by Claude Opus
/cc @rifelpet @justinsb