Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 32 additions & 3 deletions docs/operator-manual/applicationset/Generators-Git.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion docs/operator-manual/argocd-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
application.sync.impersonation.enabled: "false"
Loading