Skip to content

Commit d5fee5a

Browse files
authored
docs: sync-waves guide: Use markdown formatting (argoproj#25372)
Signed-off-by: Dov Murik <dov.murik@gmail.com>
1 parent 96804e8 commit d5fee5a

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

docs/user-guide/sync-waves.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ Adding the argocd.argoproj.io/hook annotation to a resource will assign it to a
1717

1818
## How phases work?
1919

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.
2125

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.
2526
Hooks marked with Skip will not be applied.
2627

2728
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
5556
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.
5657

5758
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
6062

6163
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.
6264

@@ -68,16 +70,16 @@ While you can use sync waves on their own, for maximum flexibility you can combi
6870

6971
When Argo CD starts a sync, it orders the resources in the following precedence:
7072

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
7577

7678
Once the order is defined:
7779

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.
8183

8284
Because an application can have resources that are unhealthy in the first wave, it may be that the app can never get to healthy.
8385

0 commit comments

Comments
 (0)