Commit graph

30 commits

Author SHA1 Message Date
Mads Jensen
a490bb3c20 Use errors.Is to check for io.EOF and gzip.ErrHeader
In GoLang, using the == operator to check for a certain error will not
unwrap the error chain, and therefore may hide the problem.

Signed-off-by: Mads Jensen <atombrella@users.noreply.github.com>
2025-12-14 08:54:11 +01:00
wyrapeseed
b9eadd3186 chore: fix some comment format
Signed-off-by: wyrapeseed <wyrapeseed@outlook.com>
2025-10-15 11:19:41 +08:00
Justen Stall
63cf42a843
fix: replace "github.com/pkg/errors" with stdlib "errors" package
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2024-11-18 11:35:59 -05:00
Nathan Baulch
ff9dd262e3
Fix typos
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-14 10:29:56 +10:00
Matt Farina
4e7e939f19
Updating the Go version in go.mod
At this time both Go 1.19 and 1.20 are supported. The version
specified in the go.mod file is the minimum version we expect Helm
to be compiled against. This is the oldest supported version to
support environments where others compile Helm. The Helm project
is using Go 1.20 to build Helm itself.

Updating to Go 1.19 also includes dealing with io/ioutil
deprecation and some additional linting issues around staticcheck.
All the staticcheck issues were in test files so linting was
skipped for those.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-03-22 11:52:30 -04:00
Matt Farina
50c22ed7f9
Bump the Go version
Needed to gofmt source to meet changes in style

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-03-22 11:29:26 -04:00
Martin Hickey
b6fef6c466 Fix backwards compatibility
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2022-12-08 16:00:45 +00:00
Martin Hickey
a59e584684 Update string handling
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2022-11-25 18:16:43 +00:00
Martin Hickey
8199db309a
Merge pull request #10693 from lucadirocco/feat/--set-json
feat: add --set-json flag to set json values.
2022-08-31 21:40:19 +01:00
Matt Farina
225f8d7732 Updating index handling
Signed-off-by: Matt Farina <matt@mattfarina.com>
2022-08-17 13:42:28 -04:00
Luca Di Rocco
11e7d0cd73 feat: add --set-json flag to set json values.
When used with helm install, helm template, helm upgrade, it enables
to set json values (scalars/objects/arrays) from the command line.

Closes #10428

Signed-off-by: Luca Di Rocco <lucadirocco@gmail.com>
2022-03-07 13:12:18 +00:00
zwwhdls
d58a984878 fix conflict
Signed-off-by: zwwhdls <zwwhdls@hotmail.com>
2020-07-01 21:38:44 +08:00
zwwhdls
1b39857ac3 add test case
Signed-off-by: zwwhdls <zwwhdls@hotmail.com>
2020-07-01 20:34:13 +08:00
zwwhdls
4532485fd0 fix another extreme case
Signed-off-by: zwwhdls <zwwhdls@hotmail.com>
2020-07-01 20:34:13 +08:00
zwwhdls
5396df2e28 fix #6116
Signed-off-by: zwwhdls <zwwhdls@hotmail.com>
2020-07-01 20:33:50 +08:00
Matt Farina
6857da251e
Catching a potential panic in strval parsing
Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-05-15 16:52:04 -04:00
Matt Farina
8f1f0e0db2
Recovering from panic that can occur with make
Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-05-15 16:00:57 -04:00
Matt Farina
bade6478fc
Fixing error with strvals parsing
Closes #8140

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-05-15 15:24:22 -04:00
Matthew Fisher
b30467c2e5
fix(strvals): port #3912, #4142, #4682, and #5151 to Helm 3
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2019-11-12 09:57:23 -08:00
Taylor Thomas
7599c5d489 feat(*): Ports --set-file flag to v3
I made a few modifications from the original code to fit in with the new
code layout and to clarify a few things. This is a port of #3758

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-09-24 12:43:43 -06:00
Oleg Sidorov
ec440d446d Replaced ghodss/yaml with sigs.k8s.io/yaml
This commit replaces usage of github.com/ghodss/yaml with it's forked
version maintained by SIG community. The replaced library has
low-to-none support activity unlike the latter. We believe the new
Helm branch could benefit from using the community-supported version on
a long-term run as yaml parser is a key component of Helm chart rendering
engine.

This commit locks sigs.k8s.io/yaml dependency version on 1.1.0 which
is backwards compatible with ghodss/yaml 1.0.0.

This change also resolves the outdated dependency version lock for
ghodss/yaml (currently 1.0.0) and makes it possible to port changes from
https://github.com/helm/helm/pull/6010 to dev-v3.

Signed-off-by: Oleg Sidorov <oleg.sidorov@booking.com>
2019-07-12 16:52:15 +02:00
Adam Reese
4f26b658d8
change copyright to "Copyright The Helm Authors" 2018-08-24 12:03:55 -07:00
Adam Reese
726e3c41be
feat(*): print stacktrace on error with debug enabled 2018-05-10 09:34:41 -07:00
Erik Sundell
6cdf6cee56 toYaml - Fixes #3470 - trailing \n issue
`toYaml` was introducing a new line. It is an issue since the new line is part of a functions output, it can't be whitespace chomped away so it would require a `trimSuffix "\n"` pipe. This commit trims one trailing `\n` from the toYaml output.
2018-04-06 00:58:54 +02:00
adshmh
1a55161a53 Fix several golint warnings (#3756)
* fix(helm): fix golint warning due to ApiVersionV1 constant name

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

* fix(helm): fix golint warning due to ResolveChartVersionAndGetRepo comment

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

* fix(helm): fix golint warnings on HttpGetter type and SetCredentials method missing a comment

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

* fix(helm):fix golint warning due to comment on FindChartInAuthRepoURL function

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

* fix(helm): fix golint warning due to RepoFile type name

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

* fix(helm): fix golint warning due to ParseString comment

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2018-03-27 13:06:04 -07:00
Arturo Contreras
a615f80c92 Adding --set-string flag to force string values. 2018-03-20 13:35:42 -06:00
Sam Leavens
a5dc546726 fix(pkg/strvals): use rune literal instead of ASCII
When checking that a value begins with zero use a rune literal instead of the
ASCII code for zero.
2017-07-27 11:32:10 -07:00
Sam Leavens
609e72b357 fix(pkg/strvals): preserve leading zeros in vals
When passing values with "helm install --set" values with leading zeros are
preserved and not parsed as ints.

Closes #2693
2017-07-26 17:16:39 -07:00
Matt Butcher
c01c7318ab
feat(helm): support array index format for --set.
This adds support for specifying list position with an array index using
`--set`. For example, this now works: `--set servers[0].port=8080`
2017-06-08 12:15:03 -06:00
Matthew Fisher
1aee50f5db move pkg cmd/helm/strvals to pkg/strvals
This is another useful package outside of cmd/helm.
2017-03-09 14:05:33 -08:00
Renamed from cmd/helm/strvals/parser.go (Browse further)