From b60861bf13b9dde31e309824f171b4f6b432e155 Mon Sep 17 00:00:00 2001 From: David Muckle Date: Mon, 28 Aug 2023 20:35:40 -0400 Subject: [PATCH] docs: Update ApplicationSet docs (#15269) Signed-off-by: David Muckle --- .../applicationset/Generators-List.md | 21 +++++++++---------- .../applicationset/GoTemplate.md | 1 + 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/operator-manual/applicationset/Generators-List.md b/docs/operator-manual/applicationset/Generators-List.md index 7cee47ae60f0e..a99229f858da4 100644 --- a/docs/operator-manual/applicationset/Generators-List.md +++ b/docs/operator-manual/applicationset/Generators-List.md @@ -38,16 +38,16 @@ With the ApplicationSet v0.1.0 release, one could *only* specify `url` and `clus spec: generators: - list: - elements: - # v0.1.0 form - requires cluster/url keys: - - cluster: engineering-dev - url: https://kubernetes.default.svc - values: - additional: value - # v0.2.0+ form - does not require cluster/URL keys - # (but they are still supported). - - staging: "true" - gitRepo: https://kubernetes.default.svc + elements: + # v0.1.0 form - requires cluster/url keys: + - cluster: engineering-dev + url: https://kubernetes.default.svc + values: + additional: value + # v0.2.0+ form - does not require cluster/URL keys + # (but they are still supported). + - staging: "true" + gitRepo: https://kubernetes.default.svc # (...) ``` @@ -74,7 +74,6 @@ spec: files: - path: applicationset/examples/list-generator/list-elementsYaml-example.yaml - list: - elements: [] elementsYaml: "{{ .key.components | toJson }}" template: metadata: diff --git a/docs/operator-manual/applicationset/GoTemplate.md b/docs/operator-manual/applicationset/GoTemplate.md index e8700ea8d31d2..15f3355421754 100644 --- a/docs/operator-manual/applicationset/GoTemplate.md +++ b/docs/operator-manual/applicationset/GoTemplate.md @@ -103,6 +103,7 @@ generators' templating: - `{{ path.filename }}` becomes `{{ .path.filename }}` - `{{ path.filenameNormalized }}` becomes `{{ .path.filenameNormalized }}` - `{{ path[n] }}` becomes `{{ index .path.segments n }}` +- `{{ values }}` if being used in the file generator becomes `{{ .values }}` Here is an example: