Linking Argo CD as a source

Alpha release

This source is currently in alpha. The interface and available tables may change.

The Argo CD connector syncs your GitOps delivery data – applications, deployment history, projects, repositories, and clusters – into PostHog, so you can analyze deployment frequency, rollback rates, and other delivery metrics alongside your product data.

Prerequisites

Argo CD is self-hosted, so your Argo CD API server must be reachable from PostHog over HTTPS with a publicly trusted TLS certificate. Servers that are only accessible on a private network or behind a VPN can't be synced.

You also need an Argo CD account with the apiKey capability enabled so it can generate API tokens. See the Argo CD user management docs for how to create a local account with apiKey capability.

Adding a data source

  1. In PostHog, go to the Sources tab of the data pipeline section.
  2. Click + New source and click Link next to this source.
  3. Enter your credentials (see Configuration below) and click Next.
  4. Select the tables you want to sync, choose a sync method and frequency, then click Import.

Once the syncs are complete, you can start querying this data in PostHog.

When linking Argo CD, you'll need:

  • Argo CD server URL – the base URL of your Argo CD API server, for example https://argocd.example.com.
  • API token – generate one with argocd account generate-token --account <account>. The account's RBAC policy needs read access to the resources you want to sync, for example applications, get, projects, get, repositories, get, and clusters, get.
  • Project (optional) – an Argo CD project name to limit which applications are synced. Leave blank to sync all applications the token can see.

Sync modes

Each table can be synced in one of several modes, depending on what the source supports:

  • Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
  • Incremental – only new or updated rows are synced on each run, using a cursor field (such as an updated_at timestamp). Cheaper than a full refresh, but deletes aren't captured.
  • Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
  • Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.

See sync methods for a full explanation of how each mode works and how to choose between them.

Argo CD tables are full refresh only: the Argo CD API has no reliable way to fetch only changed records, so each sync pulls the current state. Deployment history is flattened from each application's recorded history and deduplicated across syncs.

Configuration

OptionTypeRequired
Argo CD server URLtextYes
API tokenpasswordYes
Project (optional)textNo

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
applications

Argo CD applications with their sync state, health, and full desired/live specification.

Full refresh
deployment_history

One row per recorded deployment, flattened from each application's status.history. Useful for DORA metrics such as deployment frequency.

Full refresh
projects

Argo CD projects (AppProject resources), which group applications and restrict their sources and destinations.

Full refresh
repositories

Git and Helm repositories connected to Argo CD. Credential fields are never synced.

Full refresh
clusters

Kubernetes clusters Argo CD deploys to. Connection credentials are never synced.

Full refresh

Troubleshooting

  • If your API token is invalid or expired, generate a new token with argocd account generate-token and reconnect.
  • If some tables come back empty, the token's RBAC policy may not grant read access to those resources. Argo CD list APIs only return the items the token is allowed to see, so grant the missing get permissions and re-sync.
  • If the connection fails with a certificate error, your Argo CD server is presenting a self-signed or otherwise untrusted TLS certificate. PostHog requires a publicly trusted certificate.

If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.

Community questions

Was this page useful?