Sync vs Refresh #8260
-
Is there a clear description of sync action vs refresh vs hard refresh? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Hi @Mais316, Sync: Reconciles the current cluster state with the target state in git. Refresh: Fetches the latest manifests from git and compares diff. Hard Refresh: Argo CD caches the manifests and a hard refresh will invalidate this cache. The descriptions for these concepts can be found here https://argo-cd.readthedocs.io/en/stable/core_concepts/ IMO we should add a tooltip for these buttons in the Argo CD UI with a brief description of these concepts. |
Beta Was this translation helpful? Give feedback.
-
Hey @chetan-rns and community, I'm still not sure I understand exactly where Would you mind elaborating a bit further, Thanks! |
Beta Was this translation helpful? Give feedback.
-
I am not a maintainer so what I'm writing here might not be 100% accurate so I am open to be corrected. ArgoCD keeps several caches to avoid scaling issues. The ones involved in the regular and hard refreshes are two, the revision cache and the manifest cache. The revision cache stores all the git refs retrieved by a See the example output of ls-remote for argoproj/argo-cd here.
The manifest cache stores the kubernetes manifests generated by the source you've set in your application. For example, for a helm based application, the manifests are stored in this cache after checking the git repository at the git commit sha from your app's revision and running helm template. The key used for this cache contains the git commit hash (which could come from the above mentioned cache, see revision retrieval and the key generation). It's default duration is Now that the knowledge on the cache is there, what remains is knowing that the regular refresh forces a lookup to the git refs and the hard refresh triggers both a lookup to the git refs and a lookup to the manifests source (git). If you support a big argocd installation it's important to avoid doing refreshes when not needed. |
Beta Was this translation helpful? Give feedback.
Hi @Mais316,
Sync: Reconciles the current cluster state with the target state in git.
Refresh: Fetches the latest manifests from git and compares diff.
Hard Refresh: Argo CD caches the manifests and a hard refresh will invalidate this cache.
The descriptions for these concepts can be found here https://argo-cd.readthedocs.io/en/stable/core_concepts/
IMO we should add a tooltip for these buttons in the Argo CD UI with a brief description of these concepts.