argoproj / argo-cd

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

No apparent way to force a sync with git helm chart repo, and resulting ~5 minute wait to notice updates to a git helm repo due to caching issue, rate limiting or other unknown factors #8596

Open djvs opened 2 years ago

djvs commented 2 years ago

Checklist:

Describe the bug

Some kind of caching issue or maybe rate limiting issue prevents immediate helm repo sync, and it takes ~5 minutes for even a manual chart update to make it through Argo.

To Reproduce

  1. Set up private github helm chart repo (index.yaml, reponame-1.0.0.tgz, etc.)
  2. Update repo with reponame-1.0.1.tgz
  3. Takes ~5 minutes for Argo to notice the new chart

Expected behavior

Clicking one of "Sync", "Hard Refresh" etc. should immediately notice there's an updated chart on Github helm chart repo.

Screenshots

Version

(from UI) v2.1.3+d855831

Logs

Paste any relevant application logs here.
djvs commented 2 years ago

I think this is the setting (3 minute, configured somewhere for argo-repo-server) - https://github.com/argoproj/argo-cd/issues/7893 . The fact that there's (?) no way to bypass this is brutal.

lavurohit commented 2 years ago

I think this is the setting (3 minute, configured somewhere for argo-repo-server) - #7893 . The fact that there's (?) no way to bypass this is brutal.

ArgoCD polls configured git repositories every 3 minutes but if you want to bypass this delay you can setup a git webhook. Argo CD supports Git webhook notifications from GitHub, GitLab, Bitbucket, Bitbucket Server and Gogs. Here is the documentation for setting up a webhook.

djvs commented 2 years ago

Not possible on non-WAN-accessible instance though.

Blackclaws commented 2 years ago

https://argo-cd.readthedocs.io/en/stable/operator-manual/high_availability/#argocd-application-controller

Set timeout.reconciliation to a lower number

djvs commented 6 months ago

^ This apparently has not worked either (I saw some other issues about the same thing - the logs for the pod that shows the reconciliation lumped them all with the same timestamp when I checked, or something like that).

Still, an actual way to trigger a manual sync would be a huge improvement.

djvs commented 5 months ago

Noting here also that update/webhook triggers seems to only work on git/ssh type repositories, not the https kind - otherwise it defaults always to the 3 minutes.

thiagowfx commented 3 months ago

From a Web UI perspective, IMHO, the ideal solution here is to add a "refresh" or "fetch" button on a per-repository basis in Settings / Repositories, that would instruct the argocd-repo-server to manually pull:

image image
thiagowfx commented 3 months ago

Perhaps we could update the issue title to: "FR: Provide a way to manually fetch from git repositories, bypassing polling" (and note that the desired solution is a mechanism IN ADDITION TO webhooks).

Edit: Apparently it's possible to do so from the CLI: https://github.com/argoproj/argo-cd/issues/914#issuecomment-1618625208