Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR #671 added templating to the values section in
fleet.yaml
.Templating in
fleet.yaml
is not the same as in thetemplates/
dir of Helm charts.fleet.yaml
must be valid YAML. Using the default templating delims{{
,}}
leads to errors, if they are not quoted, as the YAML parser interprets them as JSON. Therefore this PR switches the delims to${
,}
. This will also help to differentiate one kind of templating from the other, as they don't behave the same in practice, e.g. when usingrange
orwith
.To be able to generate lists and to get rid of the recursion and reduce the number of times
template.Execute
is called, this PR treats the wholevalues:
section fromfleet.yaml
as one template. With regards to the inputs from the cluster (TemplateValues
) resource, I see no problem, because being able to change aCluster
resource requires much more privileges than changing aGitRepo
resource.The
fleet.yaml
however is already under control of the user, so any structure change in the values is likely intentional.Updated docs: rancher/fleet-docs#30
Examples branch for e2e test: https://github.com/rancher/fleet-examples/tree/test-cluster-values/single-cluster/helm-cluster-values