diff --git a/docs/operator-manual/applicationset/Generators-Git.md b/docs/operator-manual/applicationset/Generators-Git.md index a03d10e7eb428..2580b75cd8d71 100644 --- a/docs/operator-manual/applicationset/Generators-Git.md +++ b/docs/operator-manual/applicationset/Generators-Git.md @@ -422,11 +422,40 @@ spec: In `values` we can also interpolate all fields set by the git files generator as mentioned above. +## Git Polling Interval + +When using a Git generator, the ApplicationSet controller polls Git +repositories, by default, every 3 minutes to detect changes, unless +different default value is set by the +`ARGOCD_APPLICATIONSET_CONTROLLER_REQUEUE_AFTER` environment variable. +You can customize this interval per ApplicationSet using +`requeueAfterSeconds`. + +!!!note + The Git generator uses the ArgoCD Repo Server to retrieve file + and directory lists from Git. Therefore, the Git generator is + affected by the Repo Server's Revision Cache Expiration setting + (see the description of the `timeout.reconciliation` parameter in + [argocd-cm.yaml](../argocd-cm-yaml.md/#:~:text=timeout.reconciliation%3A)). + If this value exceeds the configured Git Polling Interval, the + Git generator might not see files or directories from new commits + until the previous cache entry expires. + +## The `argocd.argoproj.io/application-set-refresh` Annotation + +Setting the `argocd.argoproj.io/application-set-refresh` annotation +(to any value) triggers an ApplicationSet refresh. This annotation +forces the Git provider to resolve Git references directly, bypassing +the Revision Cache. The ApplicationSet controller removes this +annotation after reconciliation. + ## Webhook Configuration -When using a Git generator, the ApplicationSet controller polls Git repositories every 3 minutes (this can be customized per ApplicationSet with `requeueAfterSeconds`) to detect changes. To eliminate -this delay from polling, the ApplicationSet webhook server can be configured to receive webhook events. ApplicationSet supports -Git webhook notifications from GitHub and GitLab. The following explains how to configure a Git webhook for GitHub, but the same process should be applicable to other providers. +To eliminate the polling delay, the ApplicationSet webhook +server can be configured to receive webhook events. ApplicationSet +supports Git webhook notifications from GitHub and GitLab. The +following explains how to configure a Git webhook for GitHub, but the +same process should be applicable to other providers. ```yaml apiVersion: argoproj.io/v1alpha1 diff --git a/docs/operator-manual/argocd-cm.yaml b/docs/operator-manual/argocd-cm.yaml index 804f7138afe33..25b5119e73d2a 100644 --- a/docs/operator-manual/argocd-cm.yaml +++ b/docs/operator-manual/argocd-cm.yaml @@ -330,6 +330,12 @@ data: # Application reconciliation timeout is the amount of time spent before Argo tries to discover if a new manifests version got # published to the repository. Reconciliation by timeout is disabled if timeout is set to 0. Two minutes by default with additional jitter. + # For the argocd-repo-server this setting defines the expiration + # value for cached git revisions. + # When set to 0, the cache expiration value will be taken from the + # --default-cache-expiration parameter, which is 24 hours by + # default, unless another value is set using the + # ARGOCD_DEFAULT_CACHE_EXPIRATION variable). # > Note: The argocd-repo-server deployment and the argocd-application-controller statefulset (or deployment, if # configured) must be manually restarted after changing the setting. timeout.reconciliation: 120s @@ -432,4 +438,4 @@ data: webhook.maxPayloadSizeMB: "50" # application.sync.impersonation.enabled enables application sync to use a custom service account, via impersonation. This allows decoupling sync from control-plane service account. - application.sync.impersonation.enabled: "false" \ No newline at end of file + application.sync.impersonation.enabled: "false"