You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 be ns-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
Define the following configuration in your project.garden.yml:
Daphaz
changed the title
[Bug]: The defaultNamespace should use --var flag
[Bug]: Namespace name not updated when passing variables via CLI in Garden environment configuration
Oct 9, 2024
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>.
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 be
ns-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
The text was updated successfully, but these errors were encountered: