Prerequisites
- An Argo CD server reachable from CloudThinker over HTTPS. A
localhostor cluster-internal address won’t work. - Admin access to Argo CD, so you can create a local account and generate a token for it.
- The Argo CD CLI on your machine to generate the token.
- Self-hosted only:
kubectlaccess to theargocdnamespace, to edit theargocd-cmandargocd-rbac-cmConfigMaps.
Setup
Create a dedicatedcloudthinker account instead of using admin. Its token then carries only the RBAC permissions you grant it, and you can revoke it without touching anyone else.
- Self-hosted Argo CD
- Akuity Platform
1
Create a local account with API key access
Add a
cloudthinker account that can only use API keys, not the web login:2
Generate a token
Sign in as an admin, then generate a token for the new account:Copy the token. Add
--insecure to both commands only if the server uses a self-signed certificate. Without --expires-in, the token never expires, so set a lifetime and generate a new one before it lapses.Success state: the second command prints a long token string.3
Grant the account read access
Run Edit the ConfigMap rather than applying a new one.
kubectl -n argocd edit configmap argocd-rbac-cm and add these lines to the existing policy.csv:kubectl apply with a fresh argocd-rbac-cm replaces your whole policy and can lock other users out. To let agents change things, add the lines in Required permissions.4
Add the connection in CloudThinker
Open More → Workspace settings → Connections, stay on the Builtin Connections tab, and select ArgoCD. Fill in:
- ARGOCD_BASE_URL: your server address, such as
https://argocd.example.com - ARGOCD_API_TOKEN: the token you copied
- NODE_TLS_REJECT_UNAUTHORIZED (TLS verification): Verify TLS (default), or Skip TLS verification for a self-signed certificate
- READ_ONLY: change it to Read-only. The form defaults to Full access.
Connection details
Required permissions
The read lines from setup cover every read:applications, get covers application status, resource trees, managed resources, and events, and logs, get lets agents read pod logs. Add a line for each change you want agents to propose:
Agent capabilities
Every change goes through Approvals, and a rejected request isn’t retried. To let agents sync, set READ_ONLY to Full access and add the
applications, sync permission. Leave either one out and agents can only read.
Verify the connection
Example prompts
applications, sync permission.
Troubleshooting
Connect fails with fetch failed
Connect fails with fetch failed
CloudThinker can’t reach ARGOCD_BASE_URL, or the server’s certificate was rejected. Check that the address is public HTTPS, not
localhost or a cluster-internal name. For a self-signed certificate, set NODE_TLS_REJECT_UNAUTHORIZED to Skip TLS verification.Requests return 401
Requests return 401
The token is missing, expired, or was generated for a different account. Run
argocd account generate-token --account cloudthinker --expires-in 90d again, edit the connection, and paste the new token.Permission denied (code 7)
Permission denied (code 7)
The account’s RBAC role doesn’t allow that action. Check the
policy.csv lines in Required permissions: logs need logs, get and syncs need applications, sync.The application list is empty
The application list is empty
The role grants no access to those projects. The
*/* pattern in the policy covers every project; if you narrowed it, add the projects agents should see.Generating a token fails
Generating a token fails
The account doesn’t have the
apiKey capability. Run argocd account get --account cloudthinker to check, then repeat the first setup step.Security
- Least privilege — grant only the permissions the agents need for your use case; start read-only and widen later.
- Read-only by default — use read-only credentials unless you want agents to make changes through this connection.
- Rotate credentials — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
- Revoke on offboarding — remove the credential at the provider when you delete a connection or a teammate leaves.
- Dedicated account: give CloudThinker its own
cloudthinkeraccount with API key access only, never theadmintoken. - Keep TLS verification on in production: skip it only for a local or dev server with a self-signed certificate.
Related
Kubernetes connection
Let agents read the clusters Argo CD deploys to.
Approvals
Control which syncs and changes wait for a person.