Skip to content
This repository was archived by the owner on Jul 15, 2024. It is now read-only.

Commit ac37636

Browse files
authored
Tweak List and Git generator docs (#333)
* Update generator docs
1 parent 7f3b4e0 commit ac37636

File tree

3 files changed

+44
-24
lines changed

3 files changed

+44
-24
lines changed

docs/Generators-Git.md

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ As with other generators, clusters *must* already be defined within Argo CD, in
6262

6363
### Exclude directories
6464

65+
The Git directory generator will automatically exclude folders that begin with `.` (such as `.git`).
66+
6567
The Git directory generator also supports an `exclude` option in order to exclude directories in the repository from being scanned by the ApplicationSet controller:
6668

6769
```yaml

docs/Generators-List.md

+41-23
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,54 @@
11
# List Generator
22

3-
The List generator generates parameters based on any list of key/value pairs as long as the values are string values. In this example, we're targeting a local cluster named `engineering-dev`:
3+
The List generator generates parameters based on an arbitrary list of key/value pairs (as long as the values are string values). In this example, we're targeting a local cluster named `engineering-dev`:
44
```yaml
55
apiVersion: argoproj.io/v1alpha1
66
kind: ApplicationSet
77
metadata:
8-
name: guestbook
8+
name: guestbook
99
spec:
10-
generators:
11-
- list:
12-
elements:
13-
- cluster: engineering-dev
14-
url: https://kubernetes.default.svc
15-
# - cluster: engineering-prod
16-
# url: https://kubernetes.default.svc
17-
# foo: bar
18-
template:
19-
metadata:
20-
name: '{{cluster}}-guestbook'
21-
spec:
22-
project: default
23-
source:
24-
repoURL: https://github.com/argoproj-labs/applicationset.git
25-
targetRevision: HEAD
26-
path: examples/list-generator/guestbook/{{cluster}}
27-
destination:
28-
server: '{{url}}'
29-
namespace: guestbook
10+
generators:
11+
- list:
12+
elements:
13+
- cluster: engineering-dev
14+
url: https://kubernetes.default.svc
15+
# - cluster: engineering-prod
16+
# url: https://kubernetes.default.svc
17+
# foo: bar
18+
template:
19+
metadata:
20+
name: '{{cluster}}-guestbook'
21+
spec:
22+
project: default
23+
source:
24+
repoURL: https://github.com/argoproj-labs/applicationset.git
25+
targetRevision: HEAD
26+
path: examples/list-generator/guestbook/{{cluster}}
27+
destination:
28+
server: '{{url}}'
29+
namespace: guestbook
3030
```
3131
(*The full example can be found [here](https://github.com/argoproj-labs/applicationset/tree/master/examples/list-generator).*)
3232
33-
The List generator passes the `url` and `cluster` fields as parameters into the template. In this example, if one wanted to add a second element, we could uncomment the second element and the ApplicationSet controller would automatically target it with the defined application.
33+
In this example, the List generator passes the `url` and `cluster` fields as parameters into the template. If we wanted to add a second environment, we could uncomment the second element and the ApplicationSet controller would automatically target it with the defined application.
34+
35+
With the ApplicationSet v0.1.0 release, one could *only* specify `url` and `cluster` element fields (plus arbitrary `values`). As of ApplicationSet v0.2.0, any key/value `element` pair is supported (which is also fully backwards compatible with the v0.1.0 form):
36+
```yaml
37+
spec:
38+
generators:
39+
- list:
40+
elements:
41+
# v0.1.0 form - requires cluster/url keys:
42+
- cluster: engineering-dev
43+
url: https://kubernetes.default.svc
44+
values:
45+
additional: value
46+
# v0.2.0+ form - does not require cluster/URL keys
47+
# (but they are still supported).
48+
- staging: "true"
49+
gitRepo: https://kubernetes.default.svc
50+
# (...)
51+
```
3452

3553
!!! note "Clusters must be predefined in Argo CD"
3654
These clusters *must* already be defined within Argo CD, in order to generate applications for these values. The ApplicationSet controller does not create clusters within Argo CD (for instance, it does not have the credentials to do so).

docs/Getting-Started.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ How it works:
6060
- [Documentation for the `master`-branch-based developer builds](https://argocd-applicationset.readthedocs.io/en/master/) is available from Read the Docs.
6161

6262
!!! warning
63-
Development builds contain newer features and bug fixes, but are more likely to be unstable, as compared to release drivers.
63+
Development builds contain newer features and bug fixes, but are more likely to be unstable, as compared to release builds.
6464

6565
See the `master` branch [Read the Docs](https://argocd-applicationset.readthedocs.io/en/master/) page for documentation on post-release features.
6666

0 commit comments

Comments
 (0)