Commit graph

101 commits

Author SHA1 Message Date
Terry Howe
429ce93848
Merge pull request #31613 from aslafy-z/feat/getter-env
Some checks failed
build-test / build (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
golangci-lint / golangci-lint (push) Waiting to run
release / release (push) Waiting to run
release / canary-release (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
govulncheck / govulncheck (push) Has been cancelled
fix(getter): pass settings environment variables
2026-01-07 07:41:31 -07:00
Terry Howe
8802d959cb
Merge pull request #31104 from LinPr/fix
Some checks failed
build-test / build (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
golangci-lint / golangci-lint (push) Has been cancelled
release / release (push) Has been cancelled
release / canary-release (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
fix: assign KUBECONFIG environment variable value to env.Kubeconfig
2025-12-25 04:52:18 -07:00
Zadkiel AHARONIAN
8534663e73
fix(cli): handle nil config in EnvSettings.Namespace()
Signed-off-by: Zadkiel AHARONIAN <hello@zadkiel.fr>
2025-12-07 17:16:14 +01:00
Matt Farina
9dcc49cbd5 Move lint pkg to be part of each chart version
Linting is specific to the chart versions. A v2 and v3 chart will
lint differently.

To accomplish this, packages like engine need to be able to handle
different chart versions. This was accomplished by some changes:

1. The introduction of a Charter interface for charts
2. The ChartAccessor which is able to accept a chart and then
   provide access to its data via an interface. There is an
   interface, factory, and implementation for each version of
   chart.
3. Common packages were moved to a common and util packages.
   Due to some package loops, there are 2 packages which may
   get some consolidation in the future.

The new interfaces provide the foundation to move the actions
and cmd packages to be able to handle multiple apiVersions of
charts.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-09-02 12:14:37 -04:00
Matt Farina
533eddc57d Add content cache to helm env
Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-08-24 17:57:34 -04:00
Matt Farina
fea6d8eb04
Updating to tested content cache
A few things are added here:
1. The cache is made to be more generic as a content based cache.
   It could be used for other things such as plugins
2. Flags were added to specify the content cache locaiton rather
   than rely on the repository cache. Keeping the 2 the same
   hid bugs and errors.
3. Tests were added and updated to ensure the cache is used and
   tested

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-08-21 14:33:51 -04:00
LinPr
b25fa862d5 fix: assign KUBECONFIG environment variable value to env.Kubeconfig
Signed-off-by: LinPr <314573849@qq.com>
2025-07-31 22:46:40 +08:00
Mohammadreza Asadollahifard
0865d70304
refactor: change default color output setting to auto and remove ColorEnabled method
Signed-off-by: Mohammadreza Asadollahifard <mazafard@gmail.com>
2025-07-23 23:05:18 +01:00
Mohammadreza Asadollahifard
4ef0f3d5e2
Merge remote-tracking branch 'upstream/main' into feat/color-output-and-test-fixes 2025-07-23 23:00:31 +01:00
Mohammadreza Asadollahifard
d28343550f
feat: make color output opt-in by default
Signed-off-by: Mohammadreza Asadollahifard <mazafard@gmail.com>
2025-07-11 21:08:32 +01:00
Mohammadreza Asadollahifard
ba8f70ae0b
refactor: move color package to internal/cli/output
Signed-off-by: Mohammadreza Asadollahifard <mazafard@gmail.com>
2025-07-11 21:04:27 +01:00
Mohammadreza Asadollahifard
b72db06c49
refactor: replace NoColor with ColorMode for improved color output control
Signed-off-by: Mohammadreza Asadollahifard <mazafard@gmail.com>
2025-07-11 20:52:40 +01:00
Mohammadreza Asadollahifard
96c54a2963
refactor color output functions to simplify noColor checks
Signed-off-by: Mohammadreza Asadollahifard <mazafard@gmail.com>
2025-07-11 20:27:05 +01:00
naving1989
4310b2bc36 Fixed linting issues
Signed-off-by: naving1989 <navinag1989@gmail.com>
2025-07-08 11:04:51 +05:30
Mohammadreza Asadollahifard
1e00790b8c
refactor tests to use t.Setenv for NO_COLOR environment variable
Signed-off-by: Mohammadreza Asadollahifard <mazafard@gmail.com>
2025-07-07 23:20:55 +01:00
Mohammadreza Asadollahifard
c547d1f2ae
add color output functionality and tests for release statuses
Signed-off-by: Mohammadreza Asadollahifard <mazafard@gmail.com>
2025-07-07 23:20:41 +01:00
naving1989
3b2f9e7d6f test: increase test coverage for pkg/cli/options.go file
Signed-off-by: naving1989 <navinag1989@gmail.com>
2025-07-07 23:43:50 +05:30
Matthieu MOREL
56a2bb4188 chore: enable usetesting linter
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-05-30 08:12:11 +02:00
Justen Stall
280a9ddbdb
Merge branch 'main' into stdlib-errors-2
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2025-04-21 12:13:10 -04:00
Matt Farina
61d3eca55c
Move pkg/chart to pkg/chart/v2 to prepare for v3 charts
This change moves the code, updates the import locations, and
adds a doc.go file to document what the v2 package is for.

This is part of HIP 20 for v3 charts

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-02-25 15:20:44 -05:00
lubingtan
ef5614364b fix: replace mergeMaps call with loader.MergeMaps in MergeValues function
Signed-off-by: lubingtan <bingtanlu@gmail.com>
2025-02-20 08:13:54 +08:00
lubingtan
3d84e00ce7 fix: use Reader interface as the input of LoadValues and enhance UT of LoadValues
Signed-off-by: lubingtan <bingtanlu@gmail.com>
2025-02-20 08:08:18 +08:00
lubingtan
92087f6e33 feat: support multi-document values files for default chart values
Signed-off-by: lubingtan <bingtanlu@gmail.com>
2025-02-20 08:07:46 +08:00
lubingtan
0d36cb664a feat: support multi-document values files
Signed-off-by: lubingtan <bingtanlu@gmail.com>
2025-02-20 08:06:41 +08:00
Matt Farina
8edc3ac024
Merge pull request #13471 from wangjingcun/main
Use a more direct and less error-prone return value
2025-02-19 16:04:02 -05:00
wangjingcun
8b8cc94822 Use a more direct and less error-prone return value
Signed-off-by: wangjingcun <wangjingcun@aliyun.com>
2025-02-11 23:20:27 +08:00
Jonathan
37020c32fa
Update pkg/cli/values/options.go
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Jonathan <zhanweelee@gmail.com>
2025-02-09 11:11:00 +08:00
Zhanwei Li
274d43c10d feat: Enhance JSON value parsing in Helm CLI
- Add support for parsing full JSON objects with `--set-json`
- Update documentation to clarify JSON value input formats
- Improve test coverage for value parsing scenarios
- Modify `MergeValues` to handle both key=value and JSON object formats

Signed-off-by: Zhanwei Li <zhanweelee@gmail.com>
2025-02-08 10:04:14 +08:00
Matt Farina
2236294119 Updating to helm.sh/helm/v4
Since Helm is going through breaking changes with Helm v4, the version path to
Helm needs to be updated.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2024-12-26 16:33:51 -05: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
Luis Davim
ab3c589809 chore: Make retryingRoundTripper type public
Make retryingRoundTripper type public to allow being used in other
projects

fixes: #13052
Signed-off-by: Luis Davim <luis.davim@gmail.com>
2024-10-09 08:02:27 +01:00
Nathan Baulch
ef85fa7f2d
Grammar fixes
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-14 10:30:31 +10:00
Maor Friedman
84cbb2c59b fix repository-cache flag help description from file to directory
Signed-off-by: Maor Friedman <mafriedm@redhat.com>
2024-07-11 13:46:49 +03:00
Evan Foster
69362df367 fix(helm): Use burst limit setting for discovery
When --burst-limit/$HELM_BURST_LIMIT is set, the specified value is not
currently used for the discovery client instantiated by
genericclioptions. This change sets genericclioptions.discoveryBurst to
the value of --burst-limit, meaning it should now be possible to fix
client-side throttling issues encountered by the discovery client.

This value is only configured if --burst-limit is actually set. If
--burst-limit is set to the default value, then discoveryBurst should be
left at its default of 300.

Closes #13128

Signed-off-by: Evan Foster <efoster@adobe.com>
2024-06-18 13:08:21 -06:00
Calvin Krist
214fb6eff3 Fix namespace on kubeconfig error
Signed-off-by: Calvin Krist <calvin.krist@yahoo.com>
2024-04-23 23:44:39 -04:00
deterclosed
dd37787ffd chore: remove repetitive words
Signed-off-by: deterclosed <fliter@outlook.com>
2024-03-23 14:02:54 +08:00
Andy Smith
415af5b0e9 Add qps/HELM_QPS parameter
Signed-off-by: Andy Smith <iamasmith.home@gmail.com>
2023-09-22 07:31:08 +01:00
Matt Farina
0833318b32
Merge pull request #9182 from pscheid92/4030-provide-literal-alternative-for-set-flag
Provide an alternative for --set and/or --set-string to take a value literally
2023-04-28 14:39:41 -04: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
Cenk Alti
442d594570 Check status code before retrying request
Signed-off-by: Cenk Alti <cenkalti@gmail.com>
2023-01-12 21:03:45 -05:00
Jakub Warczarek
3d81ea22ac Fix after CR
Signed-off-by: Jakub Warczarek <jakub.warczarek@gmail.com>
2023-01-03 23:35:19 +01:00
Jakub Warczarek
553f1e34f5 Add test for User-Agent header setting and refactor
Signed-off-by: Jakub Warczarek <jakub.warczarek@gmail.com>
2023-01-03 23:13:11 +01:00
Jakub Warczarek
2fa7b3d1b7 Fix User-Agent header in requests made by Helm
Signed-off-by: Jakub Warczarek <jakub.warczarek@gmail.com>
2023-01-03 23:13:11 +01:00
Matt Farina
50ec3d4fe4
Fixing indentation
Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-01-03 09:18:13 -05:00
Matt Farina
6611cdcd01
Merge branch 'main' into 4030-provide-literal-alternative-for-set-flag
Signed-off-by: Matt Farina <matt@mattfarina.com>
2023-01-03 09:06:14 -05:00
Zuhair AlSader
0fdfe05844
docs: add docs for cli/values.Options
Signed-off-by: Zuhair AlSader <zuhair@koor.tech>
2022-12-08 01:45:40 -05:00
Cenk Alti
b5378b3a5d retry http request on temporary errors
Signed-off-by: Cenk Alti <cenkalti@gmail.com>
2022-10-11 19:54:10 -04:00
Patrick Scheid
451603910e feature(helm): add --set-literal flag for literal string interpretation
The current family of '--set' methods interprets some special characters
in values (e.g. commas, square brackets, points, backslashes). With the
typical shell escaping rules, this can increase the difficulty of overwriting
values in some cases.

In contrast to '--set-string' or similar methods, '--set-literal' does
not interpret those special characters. It interprets given values as
literal strings.

Example:

    --set-literal outer.inner='so\me,values'

    outer:
      inner: so\me,values

Closes #4030

Signed-off-by: Patrick Scheid <p.scheid92@gmail.com>
2022-09-23 13:35:48 +02: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
d-d-up
ece46c1d3a fix special string in the filename
Signed-off-by: d-d-up <qhr6113@163.com>
2022-08-09 14:12:26 +08:00