argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
18.05k stars 5.51k forks source link

Sync up issue with Argo CD version #20983

Open ibrarahmed1124 opened 3 days ago

ibrarahmed1124 commented 3 days ago

Checklist:

Describe the bug

Application syncup is taking longer time on one cluster. Rest cluster is working fine without any issue. Previous reported issue number - https://github.com/argoproj/argo-cd/issues/20786

To Reproduce

It takes more than 20 minutes when we syncup any application even though there is no change with the git codes.

Expected behavior

Syncup should take reasonable time.

Screenshots

385777557-5e53e09a-b93a-4630-afa0-0bd33d4f53a5

Version

argocd: v2.5.1+504da42 BuildDate: 2022-11-01T21:14:30Z GitCommit: 504da424c2c9bb91d7fb2ebf3ae72162e7a5a5be GitTreeState: clean GoVersion: go1.18.8 Compiler: gc Platform: linux/amd64

Logs

time="2024-11-27T09:52:05Z" level=info msg="Reconciliation completed" application=argocd/my-app-converge-12126 dedup_ms=0 dest-name= dest-namespace=ns-converge-12126-prod dest-server="https://kubernetes.default.svc/" diff_ms=303 fields.level=2 git_ms=336 health_ms=9 live_ms=103 settings_ms=0 sync_ms=0 time_ms=1320168

lytalk commented 3 days ago

I encountered a similar issue as well.

Describe the bug:

I have configured the ArgoCD webhook in the GitLab project deployed locally. When a push event is triggered, ArgoCD logs the event, but the sync operation is not triggered. Sometimes, it also exceeds the automatic sync cycle.

When the webhook is triggered, the following output is generated (sensitive information has been redacted): kubectl logs -f -n argocd deployment/argocd-server time="2024-11-28T11:20:37Z" level=info msg="Received push event repo: http://xxx/xxx/app, revision: master, touchedHead: true"

image

version: argocd: v2.13.1+af54ef8 BuildDate: 2024-11-20T15:58:16Z GitCommit: af54ef8db5adfa77a08d4d05b1318a2198084c22 GitTreeState: clean GoVersion: go1.23.1 Compiler: gc Platform: linux/amd64

andrii-korotkov-verkada commented 3 days ago

@lytalk, sounds like it's a different issue. Feel free to open a separate ticket for that.

@ibrarahmed1124, this is symptomatic of slow reconciliation time due to inefficient algorithm in v2.12 and below. Try upgrading to 2.13 and see if this still persists. The issue would appear if you have large app and large namespace.

andrii-korotkov-verkada commented 3 days ago

Check out the context about the reconciliation issue here https://github.com/argoproj/argo-cd/issues/20786#issuecomment-2505459936