From fb75ada4c28f4d19c3d380e4ab609f1dd3c8c182 Mon Sep 17 00:00:00 2001 From: Sverre Boschman <1142569+sboschman@users.noreply.github.com> Date: Tue, 9 Aug 2022 16:04:43 +0200 Subject: [PATCH] docs(applicationset): fix layout matrix/merge generator restrictions (#10246) Co-authored-by: Michael Crenshaw Signed-off-by: Sverre Boschman <1142569+sboschman@users.noreply.github.com> --- .../applicationset/Generators-Matrix.md | 51 ++++++++++--------- .../applicationset/Generators-Merge.md | 50 +++++++++--------- .../applicationset/Generators.md | 2 +- 3 files changed, 52 insertions(+), 51 deletions(-) diff --git a/docs/operator-manual/applicationset/Generators-Matrix.md b/docs/operator-manual/applicationset/Generators-Matrix.md index 3ed9b6469c84c..a075b757dd5eb 100644 --- a/docs/operator-manual/applicationset/Generators-Matrix.md +++ b/docs/operator-manual/applicationset/Generators-Matrix.md @@ -107,32 +107,33 @@ Finally, the Matrix generator will combine both sets of outputs, and produce: ## Restrictions 1. The Matrix generator currently only supports combining the outputs of only two child generators (eg does not support generating combinations for 3 or more). + 1. You should specify only a single generator per array entry, eg this is not valid: -```yaml -- matrix: - generators: - - list: # (...) - git: # (...) -``` + + - matrix: + generators: + - list: # (...) + git: # (...) + - While this *will* be accepted by Kubernetes API validation, the controller will report an error on generation. Each generator should be specified in a separate array element, as in the examples above. + 1. The Matrix generator does not currently support [`template` overrides](Template.md#generator-templates) specified on child generators, eg this `template` will not be processed: -```yaml -- matrix: - generators: - - list: - elements: - - # (...) - template: { } # Not processed -``` + + - matrix: + generators: + - list: + elements: + - # (...) + template: { } # Not processed + 1. Combination-type generators (matrix or merge) can only be nested once. For example, this will not work: -```yaml -- matrix: - generators: - - matrix: - generators: - - matrix: # This third level is invalid. - generators: - - list: - elements: - - # (...) -``` + + - matrix: + generators: + - matrix: + generators: + - matrix: # This third level is invalid. + generators: + - list: + elements: + - # (...) diff --git a/docs/operator-manual/applicationset/Generators-Merge.md b/docs/operator-manual/applicationset/Generators-Merge.md index fd2501d26e17a..eb32343accbf4 100644 --- a/docs/operator-manual/applicationset/Generators-Merge.md +++ b/docs/operator-manual/applicationset/Generators-Merge.md @@ -114,31 +114,31 @@ When merged with the updated base parameters, the `values.redis` value for the p ## Restrictions 1. You should specify only a single generator per array entry. This is not valid: -```yaml -- merge: - generators: - - list: # (...) - git: # (...) -``` + + - merge: + generators: + - list: # (...) + git: # (...) + - While this *will* be accepted by Kubernetes API validation, the controller will report an error on generation. Each generator should be specified in a separate array element, as in the examples above. + 1. The Merge generator does not support [`template` overrides](Template.md#generator-templates) specified on child generators. This `template` will not be processed: -```yaml -- merge: - generators: - - list: - elements: - - # (...) - template: { } # Not processed -``` + + - merge: + generators: + - list: + elements: + - # (...) + template: { } # Not processed + 1. Combination-type generators (Matrix or Merge) can only be nested once. For example, this will not work: -```yaml -- merge: - generators: - - merge: - generators: - - merge: # This third level is invalid. - generators: - - list: - elements: - - # (...) -``` + + - merge: + generators: + - merge: + generators: + - merge: # This third level is invalid. + generators: + - list: + elements: + - # (...) diff --git a/docs/operator-manual/applicationset/Generators.md b/docs/operator-manual/applicationset/Generators.md index 12e6440818fe7..cd61db5da7918 100644 --- a/docs/operator-manual/applicationset/Generators.md +++ b/docs/operator-manual/applicationset/Generators.md @@ -4,7 +4,7 @@ Generators are responsible for generating *parameters*, which are then rendered Generators are primarily based on the data source that they use to generate the template parameters. For example: the List generator provides a set of parameters from a *literal list*, the Cluster generator uses the *Argo CD cluster list* as a source, the Git generator uses files/directories from a *Git repository*, and so. -As of this writing there are seven generators: +As of this writing there are eight generators: - [List generator](Generators-List.md): The List generator allows you to target Argo CD Applications to clusters based on a fixed list of cluster name/URL values. - [Cluster generator](Generators-Cluster.md): The Cluster generator allows you to target Argo CD Applications to clusters, based on the list of clusters defined within (and managed by) Argo CD (which includes automatically responding to cluster addition/removal events from Argo CD).