-
Notifications
You must be signed in to change notification settings - Fork 568
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
(OS) Environment variable can't be used in environments file (YAML) #1141
Comments
Hi! I believe this is the same issue as #1142. |
Well, I think this is different. I have got the following situation. helmfile.yaml
values.yaml
I expect this will work, because the becauses the situation below works:
|
Anything new on this one? It seems to me kind of a different situation, as well, no? Here's another scenario: Case 1 releases:
- name: foo
chart: stable/foo
values:
- x.bar: {{ env "BAR" }}
- x.baz: {{ env "BAZ" }} If Case 2 releases:
- name: foo
chart: stable/foo
values:
- config.yaml.gotmpl where x:
bar: {{ env "BAR" }}
baz: {{ env "BAZ" }} In this case both What prevents OS environment variables from being available/rendered in both cases? What's different compared to the docs? Thanks in advance! |
It turns out that x:
bar: {{ env "BAR " }} Notice the whitespace. Not sure how this should be handled, since env variable names do not include whitespaces by convention. |
Solution here: roboll/helmfile#1141
Solution here: roboll/helmfile#1141
When I use the environment config as below
environments: dev: values: - environments/values-common.yaml - environments/values-dev.yaml - branch: {{ requiredEnv "GIT_CURRENT_BRANCH" }}
I can use the variable
branch
, but when I put this line in the filevalues-common.yaml
, I can't use it and the variable is not set (map has no entry for key "branch"
)I would be handy to use the line below in an environment file (such as
values-common.yaml
orvalues-dev.yaml
in my example)branch: {{ requiredEnv "GIT_CURRENT_BRANCH" }}
The text was updated successfully, but these errors were encountered: