-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce State Values(Environment Values + Defaulting) #640
Comments
The addition of `--set k1=v1,k2=v2` and `--values file1 --values file2` was originally planned in #361. But it turned out we already had `--values` for existing helmfile commands like `sync`. Duplicated flags doesn't work, obviously. So this actually add `--state-values-set k1=v1,k2=v2` and `--set-values-file file1 --set-values-file file2`. They are called "state" values according to the discussion we had at #640 Resolevs #361
The addition of `--set k1=v1,k2=v2` and `--values file1 --values file2` was originally planned in #361. But it turned out we already had `--values` for existing helmfile commands like `sync`. Duplicated flags doesn't work, obviously. So this actually add `--state-values-set k1=v1,k2=v2` and `--set-values-file file1 --set-values-file file2`. They are called "state" values according to the discussion we had at #640 Resolves #361
#644) The addition of `--set k1=v1,k2=v2` and `--values file1 --values file2` was originally planned in #361. But it turned out we already had `--values` for existing helmfile commands like `sync`. Duplicated flags doesn't work, obviously. So this actually add `--state-values-set k1=v1,k2=v2` and `--set-values-file file1 --set-values-file file2`. They are called "state" values according to the discussion we had at #640 Resolves #361
|
|
Please file another feature requests for adding helmfile ability to set envvars via command-line flags. |
This adds `values` to state files as proposed in #640. ```yaml values: - key1: val1 - defaults.yaml environments: default: - values: - environments/default.yaml production: - values: - environments/production.yaml ``` `{{ .Valuese.key1 }}` evaluates to `val1` if and only if it is not overrode via the production or the default env, or command-line args. Resolves #640
This adds `values` to state files as proposed in #640. ```yaml values: - key1: val1 - defaults.yaml environments: default: - values: - environments/default.yaml production: - values: - environments/production.yaml ``` `{{ .Valuese.key1 }}` evaluates to `val1` if and only if it is not overrode via the production or the default env, or command-line args. Resolves #640
This is a copy-paste of #361 (comment) for visibility.
We're going to introduce State Values, that should be the foundation for various useful features.
(Note that this isn't a breaking change)
We have a feature request that breaks
.Environment.Values
if done straightforward #398 (comment)Alternatively, we can change the term to
State Values
, and:Make it accessible in the template with
.Values
(not.Environment.Values
)Explicitly note in the documentation that
Environment Values
is for overriding(State) Values
Deprecate
.Environment.Values
and recommend using.Values
..Values
can be overrode with command-line args and environment values files(Question: How to handle global variables across helmfiles #398 (comment))When
--environment production
{{ .Environment.Values.mykey }}
fails(This preserves the existing behavior){{ .Values.mykey }}
results inmyvalue
cuz.Values
isenvironments.default.values + environments.production.values
It's
.Values
so the command-line args to set it from k-v pairs would naturally look likehelmfile --set KEY=VALUE
The command-line args to set it from a file it looks like
helmfile --values FILE
We recently implemented feat: specify env values from the parent to the nested state #622 but it should be changed. Use
helmfiles[].values
rather thanhelmfiles[].environment.values
make it similar to its command-line flag variant--values
.helmfile --environment NAME
remains as-is. It set's the state's environment name.helmfile --set-envvar NAME=VALUE
,helmfile --envvar-set
, orhelmfile --envvar
sets envvars from NAME=VALUE pairs.helmfile --envvars-file FILE
, orhelmfile --envvars FILE
sets environment variables from the FILEFor envvars, I personally prefer the combo of
helmfile --envvars-file FILE
andhelmfile --envvar-set NAME=VALUE
, as it seems user-friendly because (1)they naturally collocate in the flags list thati s alphabetically sorted (2) it's harder to confuse with--environment NAME
.The text was updated successfully, but these errors were encountered: