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: docs/user-guide/sync-waves.md
+15-13Lines changed: 15 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,12 @@ Adding the argocd.argoproj.io/hook annotation to a resource will assign it to a
17
17
18
18
## How phases work?
19
19
20
-
Argo CD will respect resources assigned to different phases, during a sync operation Argo CD will do the following.
20
+
Argo CD will respect resources assigned to different phases, during a sync operation Argo CD will do the following:
21
+
22
+
1. Apply all the resources marked as PreSync hooks. If any of them fails the whole sync process will stop and will be marked as failed
23
+
2. Apply all the resources marked as Sync hooks. If any of them fails the whole sync process will be marked as failed. Hooks marked with SyncFail will also run
24
+
3. Apply all the resources marked as PostSync hooks. If any of them fails the whole sync process will be marked as failed.
21
25
22
-
Apply all the resources marked as PreSync hooks. If any of them fails the whole sync process will stop and will be marked as failed
23
-
Apply all the resources marked as Sync hooks. If any of them fails the whole sync process will be marked as failed. Hooks marked with SyncFail will also run
24
-
Apply all the resources marked as PostSync hooks. If any of them fails the whole sync process will be marked as failed.
25
26
Hooks marked with Skip will not be applied.
26
27
27
28
Here is a graphical overview of the sync process:
@@ -55,8 +56,9 @@ Argo CD also offers an alternative method of changing the sync order of resource
55
56
Hooks and resources are assigned to wave 0 by default. The wave can be negative, so you can create a wave that runs before all other resources.
56
57
57
58
When a sync operation takes place, Argo CD will:
58
-
Order all resources according to their wave (lowest to highest)
59
-
Apply the resources according to the resulting sequence
59
+
60
+
1. Order all resources according to their wave (lowest to highest)
61
+
2. Apply the resources according to the resulting sequence
60
62
61
63
There is currently a delay between each sync wave in order to give other controllers a chance to react to the spec change that was just applied. This also prevents Argo CD from assessing resource health too quickly (against the stale object), causing hooks to fire prematurely. The current delay between each sync wave is 2 seconds and can be configured via the environment variable ARGOCD_SYNC_WAVE_DELAY.
62
64
@@ -68,16 +70,16 @@ While you can use sync waves on their own, for maximum flexibility you can combi
68
70
69
71
When Argo CD starts a sync, it orders the resources in the following precedence:
70
72
71
-
The phase
72
-
The wave they are in (lower values first)
73
-
By kind (e.g. namespaces first and then other Kubernetes resources, followed by custom resources)
74
-
By name
73
+
1.The phase
74
+
2.The wave they are in (lower values first)
75
+
3.By kind (e.g. namespaces first and then other Kubernetes resources, followed by custom resources)
76
+
4.By name
75
77
76
78
Once the order is defined:
77
79
78
-
First Argo CD determines the number of the first wave to apply. This is the first number where any resource is out-of-sync or unhealthy.
79
-
It applies resources in that wave.
80
-
It repeats this process until all phases and waves are in-sync and healthy.
80
+
1.First Argo CD determines the number of the first wave to apply. This is the first number where any resource is out-of-sync or unhealthy.
81
+
2.It applies resources in that wave.
82
+
3.It repeats this process until all phases and waves are in-sync and healthy.
81
83
82
84
Because an application can have resources that are unhealthy in the first wave, it may be that the app can never get to healthy.
0 commit comments