ArgoCD
How to configure ArgoCD with Cortex
Step 1: Use ArgoCD notification webhooks
Example config map
apiVersion: v1
kind: ConfigMap
data:
context: |
argocdUrl: https://argo.company.com
service.webhook.cortex-webhook: |
url: https://api.getcortexapp.com
headers:
- name: Content-Type
value: application/json
- name: Accept
value: application/json
- name: Authorization
value: Bearer $token
subscriptions: |
- recipients:
- cortex-webhook
triggers:
- on-sync-succeeded
template.app-sync-succeeded: |
webhook:
cortex-webhook:
method: POST
path: /api/v1/catalog/{{.app.metadata.name}}/deploys
body: |
{ "customData": { "Sync Status": "{{.app.status.sync.status}}","Sync Details": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true" },
"environment": "{{.app.spec.destination.name}}",
"sha": "{{.app.status.operationState.operation.sync.revision}}",
"timestamp": "{{.app.status.operationState.finishedAt}}",
"title": "Sync by ArgoCD",
"type": "DEPLOY"
}
trigger.on-sync-succeeded: |
- send:
- app-sync-succeeded
when: app.status.operationState.phase in ['Succeeded']
Step 2: Subscribe application to webhooks
Using the ArgoCD integration
View ArgoCD data on entity pages
Automate ArgoCD events in Workflows
See ArgoCD data in Eng Intelligence
Troubleshooting and FAQ
What permissions does my API Key need?
Ensure the Cortex API Key is encoded correctly
Check the ArgoCD logs
Still need help?
Last updated
Was this helpful?

