You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/modules/ROOT/pages/04-applicationsets.adoc
+8-12Lines changed: 8 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,21 +160,19 @@ kind: ApplicationSet
160
160
metadata:
161
161
name: coolstore-apps
162
162
namespace: {user}-argocd
163
-
finalizers:
164
-
- resources-finalizer.argocd.argoproj.io <1>
165
163
spec:
166
164
generators:
167
-
- list: <2>
165
+
- list: <1>
168
166
elements:
169
-
- environment: dev <3>
167
+
- environment: dev <2>
170
168
- environment: stage
171
169
- environment: prod
172
170
goTemplate: true
173
171
goTemplateOptions:
174
172
- missingkey=error
175
-
template: <4>
173
+
template: <3>
176
174
metadata:
177
-
name: coolstore-{{.environment}} <5>
175
+
name: coolstore-{{.environment}} <4>
178
176
namespace: {user}-argocd
179
177
spec:
180
178
destination:
@@ -190,13 +188,11 @@ spec:
190
188
prune: true
191
189
selfHeal: true
192
190
----
193
-
<1> Argo CD will automatically delete the Applications when the ApplicationSet is deleted. Including a finalizer ensures that the
194
-
resources the Application deployed will also be deleted. See more information link:https://argo-cd.readthedocs.io/en/stable/user-guide/app_deletion/#about-the-deletion-finalizer[here,window="_blank"].
195
-
<2> We are using the `list` generator which enables us to provide a static list of elements to dynamically
191
+
<1> We are using the `list` generator which enables us to provide a static list of elements to dynamically
196
192
generate applications, basically it is 1:1 per element
197
-
<3> Each element has one value, `environment`, which will be templated into the resulting Application object.
198
-
<4> The `template` section is where we define the Application resource that the ApplicationSet will create
199
-
<5> Here is an example of referencing the `environment` value to template the name.
193
+
<2> Each element has one value, `environment`, which will be templated into the resulting Application object.
194
+
<3> The `template` section is where we define the Application resource that the ApplicationSet will create
195
+
<4> Here is an example of referencing the `environment` value to template the name.
200
196
201
197
Confirm the three Applications, one for each environment, were created:
0 commit comments