Skip to content

Commit 82ca4b9

Browse files
committed
update finalizer
1 parent a22febd commit 82ca4b9

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

content/modules/ROOT/examples/app-of-apps/base/coolstore-stage.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ kind: Application
33
metadata:
44
name: coolstore-stage
55
finalizers:
6-
# The default behaviour is foreground cascading deletion
76
- resources-finalizer.argocd.argoproj.io
87
spec:
98
destination:

content/modules/ROOT/examples/applicationsets/coolstore-list-appset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: coolstore
55
namespace: $USER-argocd
66
finalizers:
7-
- resources-finalizer.argocd.argoproj.io/background
7+
- resources-finalizer.argocd.argoproj.io/foreground
88
spec:
99
goTemplate: true
1010
goTemplateOptions: ["missingkey=error"]

content/modules/ROOT/pages/04-applicationsets.adoc

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ spec:
180180
destination:
181181
name: in-cluster
182182
namespace: {user}-{{.environment}}
183-
project: {user}
183+
project: workshop
184184
source:
185185
path: content/modules/ROOT/examples/coolstore/overlays/{{.environment}}
186186
repoURL: https://github.com/OpenShiftDemos/advanced-gitops-workshop
@@ -207,7 +207,7 @@ When the ApplicationSet generates the Applications it assumes ownership of them,
207207
[.console-input]
208208
[source,sh,subs="attributes",role=execute]
209209
----
210-
oc get app coolstore-app-dev -o=jsonpath='{.metadata.ownerReferences}' -n {user}-argocd | jq -s .
210+
oc get app coolstore-dev -o=jsonpath='{.metadata.ownerReferences}' -n {user}-argocd | jq -s .
211211
----
212212

213213
[.console-output]
@@ -238,15 +238,34 @@ Delete the ApplicationSet before continuting to the next section:
238238
oc delete appset coolstore -n {user}-argocd
239239
----
240240

241+
[NOTE]
242+
It may take a minute or two for it to delete as it deletes the entire chain of applications and resources, be patient.
243+
241244
== Dynamic Generation with git Generator
242245

243-
A common pattern when deploying an application to multiple environments is to have a repository that contains the following structure:
246+
A common pattern when deploying an application with kustomize with multiple environments is to have a repository that contains the following structure:
244247

245248
* *base*: the common assets that we want to deploy
246249
* *overlays*:
247250
** *dev*: specific values that will override the ones in the base for the "dev" environment
251+
** *stage*: specific values that will override the ones in the base for the "stage" environment
248252
** *prod*: specific values that will override the ones in the base for the "prod" environment
249253

254+
You can view this structure in your cloned repository:
255+
256+
[.console-input]
257+
[source,sh,subs="attributes",role=execute]
258+
----
259+
tree ~/workshop/content/modules/ROOT/examples/coolstore
260+
----
261+
262+
[.console-output]
263+
[source,yaml,subs="attributes+,+macros"]
264+
----
265+
266+
----
267+
268+
250269
Let's deploy these applications using an ApplicationSet as we did previously but this time we will use a git generator.
251270

252271
[.console-input]

0 commit comments

Comments
 (0)