Commit graph

57 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Vibhav Bobade
4bd3b8fc06 Pass the apiserver address/port via cli, introduce HELM_KUBEAPISERVER envvar
Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
2020-02-20 04:18:10 +05:30
Vibhav Bobade
afdfb75234 Pass kube user token via cli, introduce HELM_KUBETOKEN envvar
Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
2020-02-13 03:44:49 +05:30
Josh Soref
02ad2b1187 Spelling (#7258)
* spelling: constraint

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: cryptographic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dependency

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: doesnot

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: don't

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unexpected

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dreadnought

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: default

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: envvars

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: evaluates

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: execute

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: extractor

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: frobnitz

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: generated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: implementation

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: jabba

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: keywords

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: kubernetes

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: override

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: package

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: parsable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: progress

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: recursively

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: release

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: cache

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: representing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: serializer

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: subchart

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: utilities

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2019-12-18 12:04:08 +00:00
Aaron Mell
6a98d1f1d2 Code Review Changes
Signed-off-by: Aaron Mell <amell@lumindigital.com>
2019-10-14 13:14:14 -05:00
Aaron Mell
4eca26e4e1 Modified the scope of Kubeconfig so it could be set outside an env variable.
Signed-off-by: Aaron Mell <amell@lumindigital.com>
2019-10-14 13:14:14 -05:00
Jonas Rutishauser
0650d6953d
Remove all known arguments in plugin invocations
Consistenly remove all arguments which are passed as environment
variables.

Get all arguments from environment variables passed to plugins.

Signed-off-by: Jonas Rutishauser <jonas.rutishauser@alumni.ethz.ch>
2019-10-12 21:50:42 +02:00
Taylor Thomas
1123e5ca1f fix(cli): Fixes incorrect variable reference
Because these were additions, git didn't pick up that the recent refactor of
env settings had changed some of the variables. This fixes those small changes

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-11 10:21:49 -06:00
Matthew Fisher
ed90425ebb
Merge pull request #6632 from mumoshu/add-plugin-envvars
v3: Propagate --kube-context, --kubeconfig and --namespace values to plugins
2019-10-11 09:05:43 -07:00
Yusuke Kuoka
69adc5a218 v3: Propagate --kube-context, --kubeconfig and --namespace values to plugins
Closes #6631

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2019-10-11 21:06:17 +09:00
Aaron Mell
8b8ffcdb21 Moved config and configOnce to struct
Signed-off-by: Aaron Mell <amell@lumindigital.com>
2019-10-10 16:51:59 -05:00
Aaron Mell
00249a3235 Moved namespace and kubeconfig variable back to original place.
Signed-off-by: Aaron Mell <amell@lumindigital.com>
2019-10-10 14:01:28 -05:00
Aaron Mell
1d66a676c8 Moved the GetNamespace and KubeConfig function from action to cli
Signed-off-by: Aaron Mell <amell@lumindigital.com>
2019-10-10 13:35:46 -05:00
Matt Farina
9bc7934f35
Updating the module for v3 as the major version
Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-10-03 14:27:05 -04:00
Adam Reese
d3805a1d54
ref(pkg/cli): refactor environment variable setup
This change sets proper defaults based on environment variables for
global settings and plugin environments.

Signed-off-by: Adam Reese <adam@reese.io>
2019-09-25 14:00:43 -07:00
Adam Reese
b4788481b7
fix(pkg/cli): do not override users xdg directories
Signed-off-by: Adam Reese <adam@reese.io>
2019-09-05 10:43:36 -07:00
Matt Farina
1ea53d8934
Unifity environment variable naming and use
Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-09-04 14:15:30 -04:00
Matt Farina
378b9dd29e
Remove ability to have duplicates in environment variables
Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-09-04 13:48:30 -04:00
Matt Farina
ec31f13ee9
Merge pull request #6244 from waveywaves/feature/helmenv
(feature/helm-env) `helm env`
2019-09-04 13:38:12 -04:00