Argo CD applications and revision checks
When Argo CD runs in a cluster where the Spitfire Agent is installed, the cluster's Kubernetes screen (APM / Kubernetes and the Kubernetes data source page, cluster level) gets an Argo CD applications part. Nothing is installed into Argo CD and nothing in it is changed: one Agent of the cluster reads the Applications once a minute.
What is shown
- For each Application: where it deploys (the namespace links to that namespace's view), Against Git (matches Git, differs from Git), Health (healthy, rolling out, failing, paused, resources missing), the synced revision and when it synced. A problem shows since when it lasts.
- Above the list: how many Applications there are, how many differ from Git, how many are unhealthy and how many newly synced revisions got worse. Only what needs a look hides the rest.
- A newly synced revision enters APM / Changes as a deploy of the Application (source Argo CD); a move away from Git and back enters as a config change. When the Argo CD webhook is set up too, one sync stays one row: the webhook fills in the row the Agent wrote.
- Two built-in policies: Argo CD application drifted from Git (15 minutes) and Argo CD application unhealthy (10 minutes); see Built-in policies.
Only one Agent of a cluster reads; if it stops reporting, another one takes over within three minutes. A read that cannot reach Spitfire is skipped, never queued; the next read fills in.
Revision checks
For each Application an admin can choose a test (a short smoke test or a small load test against the Application's service). Then, whenever Argo CD has synced a new revision and the Application is no longer rolling out, Spitfire runs that test once and gives the revision a verdict:
| Verdict | Meaning |
|---|---|
| Held up | p95 and error rate stayed within the allowed rise against the previous revision's run |
| Got worse | the test's own thresholds failed, or p95 or the error rate rose more than allowed |
| First measurement | there is no earlier revision to compare with; this run is the reference for the next one |
| No verdict | the run did not finish or measured no requests |
| Did not start | the run could not start (for example no free runner); the reason is shown |
The reference is the last revision that held up or was the first measurement, so a bad revision never becomes the yardstick. Open the row with the arrow to see the last checked revisions, open a run, or compare it with the previous revision's run.
Open APM / Kubernetes, choose the cluster and stay at the cluster level.
In Argo CD applications, open the Application's row with the arrow on the right.
Choose Test to run, set p95 may rise by (%) (default 20) and Errors may rise by (points) (default 1), and press Save.
Success check: the Revision check column says it waits for the next revision. After Argo CD syncs the next revision, the column shows Test running and then the verdict.
To stop, open the row and press Turn off, or switch On off to keep the settings.
A revision that got worse also opens an event (source spitfire.argocd.check, under Events) with links to the run and the comparison; the next revision that holds up closes it. To be notified, add an event policy that matches the source or the argocd.app label and sends to your channel.
Who may do what
- The list is seen by every role that opens APM.
- A revision check is set and turned off only by a workspace admin, signed in (not with an API token).
- The test runs as the admin who saved the check, with that admin's runner rules and license limits. If that admin is removed or disabled, the check says so; another admin saves it again.
Before you start
- The Spitfire Agent runs on the cluster's nodes (Agent on Kubernetes).
- The Kubernetes data source of the cluster carries the same cluster name the Agent was installed with; the screen and the built-in policies find the Applications by that name.
- The Agent may read Applications. New Agent installs include this read-only permission. An Agent installed before needs it once:
Run this once from any folder on a machine whose
kubectlpoints at the cluster:kubectl apply -f - <<'EOF' apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: spitfire-agent rules: - apiGroups: [""] resources: ["nodes/stats"] verbs: ["get"] - apiGroups: ["argoproj.io"] resources: ["applications"] verbs: ["get", "list"] EOFSuccess check: it prints
clusterrole.rbac.authorization.k8s.io/spitfire-agent configured.Check that the Agent may read them:
kubectl auth can-i list applications.argoproj.io --all-namespaces --as=system:serviceaccount:spitfire-agent:spitfire-agentSuccess check: it prints
yes. The Applications appear on the screen within two minutes.
If the screen says the Agent is not allowed to read, step 1 has not been applied to this cluster. A cluster without Argo CD shows no Argo CD part at all.