From 0a14ef9b253c7552d5b7355db94c416490801156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Lindh=C3=A9?= <7773090+lindhe@users.noreply.github.com> Date: Sat, 29 Jun 2024 01:36:56 +0200 Subject: [PATCH 1/2] docs: Fix bad cluster generator parameters (#17770) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Fix bad cluster generator parameters The previous variant used parameters `cluster` and `url`, which are nowhere to be found (I'm guessing it's from an old version of the Cluster generator). This change replaces them with the current `.nameNormalized` and `.server` parameters. Signed-off-by: Andreas Lindhé * docs: Add reference to cluster generator docs Signed-off-by: Andreas Lindhé --------- Signed-off-by: Andreas Lindhé --- .../applicationset/Template.md | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/operator-manual/applicationset/Template.md b/docs/operator-manual/applicationset/Template.md index d96fb39252fed..19d9ba98df23c 100644 --- a/docs/operator-manual/applicationset/Template.md +++ b/docs/operator-manual/applicationset/Template.md @@ -9,21 +9,24 @@ ApplicationSet is using [fasttemplate](https://github.com/valyala/fasttemplate) An Argo CD Application is created by combining the parameters from the generator with fields of the template (via `{{values}}`), and from that a concrete `Application` resource is produced and applied to the cluster. Here is the template subfield from a Cluster generator: + ```yaml # (...) template: metadata: - name: '{{cluster}}-guestbook' + name: '{{ .nameNormalized }}-guestbook' spec: source: repoURL: https://github.com/infra-team/cluster-deployments.git targetRevision: HEAD - path: guestbook/{{cluster}} + path: guestbook/{{ .nameNormalized }} destination: - server: '{{url}}' + server: '{{ .server }}' namespace: guestbook ``` +For details on all available parameters (like `.name`, `.nameNormalized`, etc.) please refer to the [Cluster Generator docs](./Generators-Cluster.md). + The template subfields correspond directly to [the spec of an Argo CD `Application` resource](../../declarative-setup/#applications): - `project` refers to the [Argo CD Project](../../user-guide/projects.md) in use (`default` may be used here to utilize the default Argo CD Project) @@ -53,7 +56,7 @@ template as a Helm string literal. For example: ```yaml metadata: - name: '{{`{{.cluster}}`}}-guestbook' + name: '{{`{{ .nameNormalized }}`}}-guestbook' ``` This _only_ applies if you use Helm to deploy your ApplicationSet resources. @@ -88,12 +91,12 @@ spec: targetRevision: HEAD repoURL: https://github.com/argoproj/argo-cd.git # New path value is generated here: - path: 'applicationset/examples/template-override/{{cluster}}-override' + path: 'applicationset/examples/template-override/{{ .nameNormalized }}-override' destination: {} template: metadata: - name: '{{cluster}}-guestbook' + name: '{{ .nameNormalized }}-guestbook' spec: project: "default" source: @@ -102,7 +105,7 @@ spec: # This 'default' value is not used: it is replaced by the generator's template path, above path: applicationset/examples/template-override/default destination: - server: '{{url}}' + server: '{{ .server }}' namespace: guestbook ``` (*The full example can be found [here](https://github.com/argoproj/argo-cd/tree/master/applicationset/examples/template-override).*) @@ -140,15 +143,15 @@ spec: - values.debug.yaml template: metadata: - name: '{{.cluster}}-deployment' + name: '{{ .nameNormalized }}-deployment' spec: project: "default" source: repoURL: https://github.com/infra-team/cluster-deployments.git targetRevision: HEAD - path: guestbook/{{ .cluster }} + path: guestbook/{{ .nameNormalized }} destination: - server: '{{.url}}' + server: '{{ .server }}' namespace: guestbook templatePatch: | spec: From 51c8013d9c04286c6a8b53663381c19d62348111 Mon Sep 17 00:00:00 2001 From: adam tombleson Date: Sat, 29 Jun 2024 05:09:54 +0300 Subject: [PATCH 2/2] docs: update notifications secret name (#18850) All other examples reference `argocd-notifications-secret`, this seems to be the correct name Signed-off-by: adam tombleson --- docs/operator-manual/notifications/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/operator-manual/notifications/index.md b/docs/operator-manual/notifications/index.md index eccca906ae91b..002f67249c616 100644 --- a/docs/operator-manual/notifications/index.md +++ b/docs/operator-manual/notifications/index.md @@ -93,7 +93,7 @@ data: apiVersion: v1 kind: Secret metadata: - name: argo-cd-notification-secret + name: argocd-notifications-secret type: Opaque data: pagerduty-key-my-service: