Open Daphaz opened 3 weeks ago
This looks like a legit bug but just FYI and to add to the list of workarounds, you can also set the namespace via the --env
flag with the format <namespace>.<environment>
.
For example:
garden deploy --env my-namespace.my-env
(From this guide: https://docs.garden.io/guides/namespaces)
Bug
Current behavior
When dynamically defining a namespace name in the
project.garden.yml
using a variable passed through the CLI, the namespace name reverts to the default value instead of the one passed via the command line. For example, in the following configuration:When running the command
garden deploy --env preview --var my-variable=test
, the expected namespace should bens-test
, but it instead uses the default value based on the git branch.Expected behavior
The namespace name should be dynamically assigned based on the variable passed via the CLI (--var my-variable=test), not reverting to the default.
Reproducible example
project.garden.yml
:ns-test
, but based on the default git branch instead.Workaround
As a workaround, use environment variables to override the value:
And run the command with the following:
Suggested solution(s)
N/A
Additional context
N/A
Your environment
garden version: 0.13.41