helmfile/docs
Dominik Schmidt 33eadc993e
feat: support HELMFILE_* env vars for more global flags (#2606)
* feat: support more HELMFILE_* env vars as flag fallbacks

Adds env-var fallbacks for global flags, mirroring the existing
HELMFILE_ENVIRONMENT / HELMFILE_KUBE_CONTEXT pattern:

* --helm-binary       -> HELMFILE_HELM_BINARY
* --kustomize-binary  -> HELMFILE_KUSTOMIZE_BINARY
* --log-level         -> HELMFILE_LOG_LEVEL
* --debug             -> HELMFILE_DEBUG       (expecting "true" lower case)
* --quiet             -> HELMFILE_QUIET       (expecting "true" lower case)
* --no-color          -> HELMFILE_NO_COLOR    (expecting "true" lower case),
                         additionally honors NO_COLOR per no-color.org
                         (any non-empty value disables color)

Flag values still take precedence; env vars are consulted only when the
flag is unset. The string-flag default values ("helm", "kustomize",
"info") move into the accessor methods so the env-var fallback can
actually trigger when no flag is passed.

Signed-off-by: Dominik Schmidt <dev@dominik-schmidt.de>

* docs: mention new HELMFILE_* env vars in cli.md and templating.md

Signed-off-by: Dominik Schmidt <dev@dominik-schmidt.de>

* fix: make Color/NoColor/env interaction consistent

Two issues with the env-aware NoColor() introduced together with
HELMFILE_NO_COLOR / NO_COLOR support:

1. Color() consulted the raw GlobalOptions.NoColor field instead of
   NoColor(), so in a TTY with only the env set, Color() fell through
   to terminal autodetect and ValidateConfig() spuriously errored with
   "--color and --no-color cannot be specified at the same time".

2. NoColor() returned true via env even when --color was explicitly
   passed, so `helmfile --color` with NO_COLOR (or HELMFILE_NO_COLOR=true)
   in the environment hit the same ValidateConfig() error. A flag should
   always win over an env var.

Fix both by routing Color() through NoColor() and giving NoColor() an
explicit --color short-circuit. Regression tests added for both paths.

Signed-off-by: Dominik Schmidt <dev@dominik-schmidt.de>

---------

Signed-off-by: Dominik Schmidt <dev@dominik-schmidt.de>
2026-05-22 09:16:52 +08:00
..
proposals feat(docs): add proposal to remove charts and delete subcommands (#1936) 2025-02-24 08:11:15 -05:00
advanced-features.md docs: restructure documentation and improve newcomer experience (#2573) 2026-05-03 19:33:33 +08:00
builtin-objects.md docs: restructure documentation and improve newcomer experience (#2573) 2026-05-03 19:33:33 +08:00
cli.md feat: support HELMFILE_* env vars for more global flags (#2606) 2026-05-22 09:16:52 +08:00
configuration.md feat: add defaultInherit for automatic release template inheritance (#2600) 2026-05-20 18:21:03 +08:00
contributing.md Documentation site based on mkdocs and Read the Docs 2022-04-03 05:04:54 +00:00
environments.md feat(state): add mergeStrategy: fallback for first-file-wins env values (#2578) 2026-05-07 21:50:05 +08:00
experimental-features.md docs: restructure documentation and improve newcomer experience (#2573) 2026-05-03 19:33:33 +08:00
hcl_funcs.md feat: Add IP Network to supported HCL Functions (#2426) 2026-02-26 17:20:48 +08:00
hooks.md docs: restructure documentation and improve newcomer experience (#2573) 2026-05-03 19:33:33 +08:00
index.md docs: restructure documentation and improve newcomer experience (#2573) 2026-05-03 19:33:33 +08:00
integrations.md docs: restructure documentation and improve newcomer experience (#2573) 2026-05-03 19:33:33 +08:00
license.md Documentation site based on mkdocs and Read the Docs 2022-04-03 05:04:54 +00:00
paths.md update examples info (#658) 2023-01-26 07:34:43 +09:00
releases.md docs: restructure documentation and improve newcomer experience (#2573) 2026-05-03 19:33:33 +08:00
remote-secrets.md update example chart URL in remote-secrets doc (#1809) 2024-11-28 13:19:08 +08:00
requirements.txt build(deps): bump gitpython from 3.1.49 to 3.1.50 in /docs (#2585) 2026-05-09 20:46:32 +08:00
shared-configuration-across-teams.md chore: documentation updates: grammar & rm whitespace (#1639) 2024-07-21 13:31:41 +08:00
templating.md feat: support HELMFILE_* env vars for more global flags (#2606) 2026-05-22 09:16:52 +08:00
templating_funcs.md feat: add isDir template function (#1657) 2024-08-06 21:39:00 +08:00
users.md Documentation site based on mkdocs and Read the Docs 2022-04-03 05:04:54 +00:00
values-and-merging.md feat(state): add mergeStrategy: fallback for first-file-wins env values (#2578) 2026-05-07 21:50:05 +08:00
writing-helmfile.md feat: add defaultInherit for automatic release template inheritance (#2600) 2026-05-20 18:21:03 +08:00