GitopsTemplate default parameter value not honoured in calculated path
Opened this issue · 0 comments
Describe the bug
When rendering a GitopsTemplate that uses default paths and NAMESPACE as a parameter is set by a default value, the value is ignored and the value: "default" is used instead of the value for NAMESPACE, set in the template.
To Reproduce
Using a GitopsTemplate where default paths are calculated from the values
and the namespace param is set to a default value like this:
params:
- name: CLUSTER_NAME
description: The name for cluster.
- name: NAMESPACE
description: The namespace for this cluster
default: devteam1
Actual behaviour
According to the docs, this should set the default path output of the namespace to the value, but the output we see in the PR Preview and in a generated PR is:
./clusters/default/CLUSTER_NAME/...
And NOT
./clusters/devteam1/CLUSTER_NAME/...
If you type in the value "devteam1" to the param NAMESPACE instead of leaving it as the default, it correctly outputs to the directory:
./clusters/devteam1/CLUSTER_NAME
Expected behaviour
Using a default for a param in a GitopsTemplate should be honoured by the calculated path, when nothing is input.
Additional context
- Weave GitOps version: 0.32.1