Skip to content

Commit

Permalink
Merge branch 'master' into cmp/manifest-logs
Browse files Browse the repository at this point in the history
  • Loading branch information
pasha-codefresh committed Jun 29, 2024
2 parents 0946e15 + 51c8013 commit 46ebf75
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
23 changes: 13 additions & 10 deletions docs/operator-manual/applicationset/Template.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand All @@ -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).*)
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/operator-manual/notifications/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <pd-integration-key>
Expand Down

0 comments on commit 46ebf75

Please sign in to comment.