Open ethankhall opened 1 year ago
Playing around with this example verbatim, I can't even override CLOUDDEV_AUTO_MIGRATE
with an explicit environment variable either:
Reading the variable docs closely, it looks like CLOUDDEV_AUTO_MIGRATE
is a static value and must be explicitly overridden with --var CLOUDDEV_AUTO_MIGRATE=foobar
. This does change the value, but it's still not from the .env
file:
The section on env vars states that:
... without the need to explictly define them.
Removing the CLOUDDEV_AUTO_MIGRATE: false
line results in the expected output to devspace run-pipeline test
:
but with the loss of the default false
behavior:
It looks like the v1beta style default
config is still available, and this appears to mitigate the issue:
@ethankhall @noizwaves thanks for creating this issue! The correct syntax is to use:
vars:
MY_ENV_VAR:
source: env
default: my-default
which would be then overridable from the .env file as @noizwaves has suggested
We'll also update the documentation for this
@FabianKramm can you also update the parsing of v1beta11 into v2beta1 to show the values of vars?
When I run devspace print
against the v1beta11, the only var in the yaml output is
vars:
DEVSPACE_ENV_FILE:
value: .env
alwaysResolve: false
@ethankhall variables should be shown separately within the devspace print
section as these could change or not even be defined (in the case of environment variables), so the vars
section would be incomplete anyways
What happened?
Defining a default value in the devspace.yaml file will not be overwritten by the
.env
file. I tried puttingDEVSPACE_ENV_FILE: ".env"
at the beginning and end of the vars.When running
devspace run-pipeline test
I getWhat did you expect to happen instead?
When running
devspace run-pipeline test
I getHow can we reproduce the bug? (as minimally and precisely as possible)
My devspace.yaml:
My
.env
:Local Environment:
/kind bug