Overview
OpenSRE queries the Argo CD REST API as a read-only evidence source when you ask about GitOps deployments. It can list visible applications, inspect one application’s sync and health status, and fetch sanitized server-side diff output to show deployment drift.Prerequisites
- Argo CD API server reachable from the machine running OpenSRE
- A dedicated Argo CD account or API token with read access to the applications you want OpenSRE to inspect
- The Argo CD base URL, for example
https://argocd.example.com
Setup
Argo CD is configured through environment variables or the persistent integration store. There is no dedicatedopensre integrations setup argocd wizard today.
Option 1: Environment variables
Add one authentication method to your.env:
OpenSRE rejects ambiguous auth configuration. Do not set a bearer token and username/password at the same time.
Option 2: Persistent store
You can also add Argo CD to~/.opensre/integrations.json:
auth_token or token as aliases for bearer_token. For username/password auth, omit bearer_token and set username and password instead.
Option 3: Multiple Argo CD instances
For multiple Argo CD instances, setARGOCD_INSTANCES to a JSON array. The first valid instance is used as the default integration.
ARGOCD_INSTANCES is set, the single-instance ARGOCD_BASE_URL and auth variables are ignored for this service. opensre integrations verify argocd validates the resolved default instance.
Credentials
- In Argo CD, create a dedicated read-only account or API token for OpenSRE.
- Grant that identity list/get access to the applications (and projects) you want investigated.
- Set either:
ARGOCD_AUTH_TOKEN/ARGOCD_TOKEN(or storebearer_token), orARGOCD_USERNAME+ARGOCD_PASSWORD(or storeusername/password)
- Set
ARGOCD_BASE_URLto your API base (HTTPS for remote hosts).
Tools
Once Argo CD is configured, start
opensre and name the application in your question, e.g. “Is checkout-api out of sync? What drifted?”
Local verification recipe
Verified both registered tools live against a real local Argo CD install with a real GitOps application synced from a public repo.opensre integrations verify) only fall through to env
vars when the store has no records at all — any existing record, for any service, blocks
env-var resolution entirely. Point OPENSRE_INTEGRATIONS_STORE_PATH at a path inside a
fresh empty directory instead, so your real config is never read or written and the
ARGOCD_* vars above are the only source of connection info:
argocd_application_diff needs real drift to return anything interesting — with
selfHeal: true set above, Argo CD reverts live-cluster drift within seconds, so
disable automated sync first to introduce a drift that actually sticks:
argocd_application_diff
isn’t guaranteed to run every time — on a turn where it did, it correctly reported the
drift introduced above: guestbook-ui’s replica count changed from the desired 1 to
the live 3. Both registered tools return real data through this same chat flow —
argocd_application_status for sync/health status, revision, and operation phase, and
argocd_application_diff for per-resource drift when the agent calls it.
Teardown:
Verify
Troubleshooting
Security
- Use a dedicated read-only Argo CD account or token for OpenSRE.
- Store credentials in
.envor~/.opensre/integrations.json, not in source code. - Use
https://for remote Argo CD URLs. Plainhttp://is accepted only for loopback or localhost development URLs. - Do not disable
ARGOCD_VERIFY_SSLfor production instances. - OpenSRE redacts bearer tokens, passwords, token-like strings, and Kubernetes
Secretdiffs before surfacing Argo CD errors or diff evidence. - The integration is read-only: it lists applications, reads application summaries, and reads server-side diff data. It does not sync, modify, or delete Argo CD resources.