New to Kestra?
Use blueprints to kickstart your first workflows.
Audits Argo CD applications to detect out-of-sync states and degraded conditions, preventing GitOps deployment failures and silent drift.
Enterprise Kubernetes platforms rely on Argo CD for declarative GitOps continuous delivery. When deployments suffer from Helm value syntax errors, missing secrets, failing probes, or CRD schema mismatches, applications become stuck in OutOfSync or Degraded states. If unattended, automated rollouts freeze and production workloads diverge from Git source-of-truth repositories. This sentinel interrogates the Argo CD REST API, audits sync and health conditions across target projects, and notifies DevOps and GitOps teams on Slack with exact sync remediation commands.
*/30 * * * *) or triggers on-demand via manual execution or CI/CD commit webhooks./api/v1/applications) with an authorized bearer token..status.sync.status and .status.health.status for each application, flagging states like OutOfSync, Degraded, or Missing.io.kestra.plugin.core.flow.If task evaluates whether degraded_apps_count exceeds max_tolerated_degraded_apps.SlackIncomingWebhook listing application names, projects, sync states, and argocd app sync commands.flowchart TD
A[scheduled_argocd_audit Schedule Trigger] --> B[scan_argocd_applications Python Script]
B --> C[check_degraded_apps Flowable If]
C -- Degraded Found --> D[notify_slack_gitops Webhook]
C -- All Apps Synced --> E[log_argocd_audit_status Log]
D --> E
E --> F[export_argocd_manifest Return]
| Name | Type | Default | Description |
|---|---|---|---|
argocd_server_url |
STRING |
https://argocd.internal.company.com |
Base URL for the Argo CD API server. |
project_filter |
STRING |
default |
Name of the Argo CD project to audit, or all to scan all registered applications. |
alert_on_degraded_sync |
BOOL |
true |
Whether to dispatch alerts when out-of-sync or degraded applications are detected. |
max_tolerated_degraded_apps |
INT |
0 |
Maximum allowable count of degraded or out-of-sync applications before raising alerts. |
{{ outputs.scan_argocd_applications.vars.total_applications_audited }}: Number of Argo CD applications inspected during the audit.{{ outputs.scan_argocd_applications.vars.degraded_apps_count }}: Number of applications in degraded, out-of-sync, or missing states.{{ outputs.scan_argocd_applications.vars.degraded_apps_details }}: Serialized JSON list of degraded applications with sync status and CLI commands.{{ outputs.export_argocd_manifest.value }}: Structured dictionary containing the consolidated GitOps cluster health summary.applications, get permissions.ARGOCD_AUTH_TOKEN: Argo CD API bearer token with read access to applications.SLACK_WEBHOOK_URL: Slack Incoming Webhook endpoint URL used for sending security alerts.ARGOCD_AUTH_TOKEN and SLACK_WEBHOOK_URL in your Kestra Secret storage.company.devops namespace.argocd_server_url to point to your internal Argo CD domain.default project only.POST /api/v1/applications/{name}/sync to automatically trigger reconciliation for transient sync failures.