Tuesday, November 5, 2024
HomeKubernetesArgoCDHow To Modify the Application Reconciliation Timeout in Argo CD

How To Modify the Application Reconciliation Timeout in Argo CD

If you are working on ArgoCD or if you are following us, if you may experience, when even you make a change on the repository, it populates after some time based on configuration. Which is setup with Application Reconciliation Timeout in configmap. But sometimes we cannot go with default settings, it may be due to, we need the change should applied immediately or we may need to change it for improving the performance. In this post will see how to modify the application reconciliation timeout in ArgoCD.

In Argo CD, Application reconciliation timeout is responsible for how often your applications will sync from Argo CD to the Git repository. It looks for changes and when it sees changes it will then apply the desired state from the repo to the Kubernetes (K8s) cluster. By default, the timeout period is set to 3 minutes.

In general, all the Argo CD configurations are set in the argocd-cm ConfigMap. You can check current configuration using kubectl command on your K8s cluster that is running your Argo CD instance:

# kubectl describe configmaps argocd-cm -n argocd

Most Argo CD instances are running the default settings for its configurations. The argocd-server component reads and writes to the argocd-cm ConfigMap and other Argo configuration ConfigMaps based on admin user interactions with the Argo CD web UI or the Argo CD CLI. It is normal for it to be empty with Data at 0 if you have not changed any defaults or set anything directly in the ConfigMap yet.

To change the Application reconciliation timeout, you need to do the following:

  • Get a copy of the argocd-cm ConfigMap from in your cluster.
  • Then find for the Application reconciliation like “timeout.reconciliation: 180s”.
  • Change “180s” to whatever number you want to change it to i.e. change to “60s” to reduce the sync internal to 1 minute.
  • Final manifest will be shown like with your existing configuration.
apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-cm
  namespace: argocd
  labels:
    app.kubernetes.io/name: argocd-cm
    app.kubernetes.io/part-of: argocd
data:
  timeout.reconciliation: 60s
. . .
  • Connect to the Kubernetes cluster that is running Argo CD and apply the argocd-cm ConfigMap file you just updated by running the following:

    # kubectl apply -f argocd-cm.yaml -n argocd
    
  • Run the following to verify the update was applied:

    # kubectl describe configmaps argocd-cm -n argocd

    You should also notice new change is listed under Data for the ConfigMap now.
  • It is a good practice to redeploy the argocd-repo-server after updating the argocd-cm ConfgigMap. You can redeploy the argocd-repo-server by running the following:

    # kubectl -n argocd rollout restart deploy argocd-repo-server

That’s it! Now your app in Argo CD will sync on the new Application Reconciliation Timeout that you set.

You can follow for more high availability recommendation on https://argo-cd.readthedocs.io/en/stable/operator-manual/high_availability/.

RELATED ARTICLES
- Advertisment -

Most Popular

Recent Comments