Commit graph

83 commits

Author SHA1 Message Date
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
Justen Walker
687852e4fe feat(*): add flags/env for kube api tls overrides
Add a new flags and associated environment variables to override
 the TLS Settings used when constructing the Kube Client.

- `--kube-insecure-skip-tls-verify | HELM_KUBEINSECURE_SKIP_TLS_VERIFY`: if true, the kube api server's certificate will not be checked for validity. This will make your HTTPS connections insecure
- `--kube-tls-server-name | HELM_KUBETLS_SERVER_NAME`: server name to use for kube api server certificate validation. If it is not provided, the hostname used to contact the server is used

Signed-off-by: Justen Walker <justen.walker+github@gmail.com>
2022-05-19 23:32:00 -04:00
Igor Sutton
823d929421
Add --burst-limit option for client-side throttling limit configuration (#10842)
* feat: add configuration for client-side throttling limit

Client-side throttling seems to be an issue in larger environments such as OpenShift clusters, where
it is common to have several hundreds CRDs out-of-the-box.

From this view point, it is fair that clients should be able to fine tune this accordingly should the
environment they work on evolves, which is currently not possible, and quite frustrating.

This change introduces the --default-burst-limit option to helm (and its counterpart
HELM_DEFAULT_BURST_LIMIT environment variable) to address that issue, allowing clients to properly
tune their client usage as their environment evolves.

Signed-off-by: Igor Sutton <isuttonl@redhat.com>

* chore: change DefaultBurstLimit to BurstLimit

Signed-off-by: Igor Sutton <isuttonl@redhat.com>

* chore: add HELM_BURST_LIMIT to golden file

Signed-off-by: Igor Sutton <isuttonl@redhat.com>

* chore: add burst limit tests

Signed-off-by: Igor Sutton <isuttonl@redhat.com>

* docs: add burst limit default value to documentation

Signed-off-by: Igor Sutton <isuttonl@redhat.com>

* refactor: change burst limit default value to 100 per review instructions

Signed-off-by: Igor Sutton <isuttonl@redhat.com>
2022-05-17 20:00:57 +02:00
Zoran Krleza
06c39c8079 Fixing downloader plugin error handling
Signed-off-by: Zoran Krleza <zoran.krleza@true-north.hr>
2022-04-05 10:17:24 +02: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
Martin Hickey
9975d62525 Handle Hungarian notation issue
Issue with smallCaps combination e.g. kCaFile

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2022-01-20 15:36:10 +00:00
Martin Hickey
f0fd37d2c5 Replace golint with revive
golint which is used as one of the sublinters in golangci-lint is deprecated.
It is replaced with revive which is a drop-in replacement.

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>

Co-authored-by: Martin Mulholland <mmulholl@redhat.com>
2022-01-20 15:19:40 +00:00
Allen Bai
e08a9270be
HELM_REGISTRY_CONFIG: change default file of registry config to config.json
Changes default registry config file from `registry.json` to
`config.json`. This aligns with the `config.json` that is widely used in docker.

Closes: https://github.com/helm/helm/issues/10156
Related: https://github.com/helm/helm/issues/10122
Signed-off-by: Allen Bai <abai@redhat.com>
2022-01-11 15:19:28 -05:00
yxxhero
0d3289eb0b add unittest for SetNamespace method
Signed-off-by: yxxhero <aiopsclub@163.com>
2021-10-08 23:02:29 +08:00
yxxhero
d376a67ba8 add SetNamespace method for EnvSettings, in order to set namespace in helm sdk
Signed-off-by: yxxhero <aiopsclub@163.com>
2021-10-08 22:40:04 +08:00
Marc Khouzam
593b267ed5 feat(comp): Add descriptions for output format
Ref: HIP 0008

When completing output formats, extra information will be shown
for shells that support completions (fish, zsh).  For example:

$ helm status -o <TAB>
json   -- Output result in JSON format
table  -- Output result in human-readable format
yaml   -- Output result in YAML format

Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
2021-02-24 11:43:45 -05:00
Lüchinger Dominic
cc1d2d62e9 Adds the option kube-cafile and env variable HELM_KUBECAFILE for a overwrite of the certificate authority file
Signed-off-by: Lüchinger Dominic <dev@snowgarden.ch>
2020-12-11 07:29:37 -05:00
Marc Khouzam
e16d26717b fix(helm): flag descriptions start with lowercase
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
2020-11-05 18:52:40 -05:00
leigh capili
9429af8b39 Support impersonation via flags similar to kubectl --as="user"
Signed-off-by: leigh capili <leigh@null.net>
2020-09-09 14:49:01 -06:00
wawa0210
637a5c6494 Environment variable for setting the max history for an environment
Signed-off-by: wawa0210 <xiaozhang0210@hotmail.com>
2020-07-08 23:02:40 +08:00
Matt Farina
f90b842d3e
Merge branch 'master' into xdg 2020-05-05 10:07:10 -04:00
Matt Farina
2334195a01
Adding Helm env vars where XDG exposed
Helm had been exposing XDG based variables to end users. This lead
to confusion. For example, if a user wanted to change the cache
location Helm used should they change the XDG variable? Since this
would be like changing the HOME environment variable the answer
is no.

This change adds HELM_*_HOME environment variables to be used
in addition to XDG ones of the same name. Helm will now look
for the Helm specific variable. If not set, Helm will fall
back to XDG locations. If those are not set a default location
will be used. This keeps XDG in use as a default when present,
provides users with the ability to set the location, and removes
XDG from being exposed to end users to avoid confusion.

Closes #7919

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-04-28 11:28:56 -04:00
Adam Reese
4a0dfbe53b
fix(pkg/cli): ensure correct configuration from kubeconfig file
Bind Helm flags to Kubernetes configuration loader to get a merged
config with kubeconfig.

Fixes: #7539

Signed-off-by: Adam Reese <adam@reese.io>
2020-04-23 12:20:14 -07:00
Matthew Fisher
14f6d1ea97
ref(environment): use string checking instead
It is more idiomatic to compare the string against the empty string than to check the string's length.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2020-03-02 12:09:41 -08:00