Skip to content

ArgoCD Integration

Monitor and manage Kubernetes deployments from ArgoCD in Cased

Cased can receive deployment events from ArgoCD to monitor your Kubernetes deployments automatically. This guide will help you set up the integration.

Terminal window
# Get your personalized ArgoCD configuration
curl -H "Authorization: Bearer YOUR_API_KEY" https://app.cased.com/api/v1/argocd/setup

This returns a complete YAML configuration customized for your organization.

Save the configuration to a file and apply it:

Terminal window
kubectl apply -f argocd-comet-notifications.yaml -n argocd

Or use our one-liner setup script:

Terminal window
curl -H "Authorization: Bearer YOUR_API_KEY" https://app.cased.com/api/v1/argocd/setup | \
jq -r '.setup_script' | bash

Add these annotations to your ArgoCD Applications:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: your-app
namespace: argocd
annotations:
# Subscribe to Cased notifications
notifications.argoproj.io/subscribe.on-sync-running.cased: ""
notifications.argoproj.io/subscribe.on-sync-succeeded.cased: ""
notifications.argoproj.io/subscribe.on-sync-failed.cased: ""
# Tell Cased which repository this belongs to
cased.com/repository: "owner/repo"

That’s it! ArgoCD will now send deployment events to Cased.

Cased automatically captures:

  • Application sync status (Syncing, Synced, OutOfSync, Failed)
  • Health status (Healthy, Degraded, Progressing, Suspended)
  • Deployment metadata (cluster, namespace, revision)
  • Timing information (start time, end time, duration)
  • Error messages when syncs fail
  • Resource counts (number of resources synced)
  1. ArgoCD triggers notifications when applications change state
  2. Notifications are sent to Cased’s webhook endpoint
  3. Cased creates deployment events and triggers monitoring workflows
  4. Your team gets notified via Slack/email about deployment status
  5. AI agents can respond to issues automatically

If you prefer to configure manually, create this ConfigMap:

apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-notifications-cm
namespace: argocd
data:
# Webhook service for Cased
service.webhook.cased: |
url: https://app.cased.com/api/v1/argocd/webhook
headers:
- name: Authorization
value: Bearer YOUR_API_KEY
# Template that sends the full ArgoCD app state
template.cased-sync: |
webhook:
cased:
method: POST
body: |
{{ .ToJSON }}
# Triggers for different events
trigger.on-sync-running: |
- when: app.status.operationState.phase in ['Running']
send: [cased-sync]
trigger.on-sync-succeeded: |
- when: app.status.operationState.phase in ['Succeeded']
send: [cased-sync]
trigger.on-sync-failed: |
- when: app.status.operationState.phase in ['Failed', 'Error']
send: [cased-sync]
trigger.on-health-degraded: |
- when: app.status.health.status == 'Degraded'
send: [cased-sync]
Terminal window
curl -X POST https://app.cased.com/api/v1/argocd/webhook \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"app": {
"metadata": {
"name": "test-app",
"namespace": "argocd",
"annotations": {
"cased.com/repository": "owner/repo"
}
},
"status": {
"operationState": {
"phase": "Running"
}
}
}
}'
  1. Go to your Cased dashboard
  2. Navigate to Deployments
  3. You should see ArgoCD deployments with the “ArgoCD” trigger type
  1. Check ArgoCD notifications controller logs:

    Terminal window
    kubectl logs -n argocd deployment/argocd-notifications-controller
  2. Verify the ConfigMap is loaded:

    Terminal window
    kubectl get cm argocd-notifications-cm -n argocd -o yaml
  3. Ensure your application has the correct annotations:

    Terminal window
    kubectl get application YOUR_APP -n argocd -o yaml | grep notifications

If you see “repository not found” errors, ensure:

  1. The repository exists in Cased
  2. The cased.com/repository annotation matches exactly
  3. Format is owner/repo (e.g., myorg/myapp)

You can manually trigger a test notification:

Terminal window
kubectl exec -it deployment/argocd-notifications-controller -n argocd -- \
argocd-notifications template notify cased-sync YOUR_APP \
--recipient webhook:cased
  • API Key: Store your API key securely. Consider using Kubernetes secrets
  • Network: Ensure your ArgoCD cluster can reach api.cased.com
  • Permissions: The API key only needs deployment event creation permissions

For multiple clusters, you can add cluster information to the annotations:

annotations:
cased.com/repository: "owner/repo"
cased.com/cluster: "production-us-east"
cased.com/environment: "production"

Add any custom metadata you want tracked:

annotations:
cased.com/repository: "owner/repo"
cased.com/team: "platform"
cased.com/cost-center: "engineering"

Only subscribe to specific events:

annotations:
# Only notify on failures
notifications.argoproj.io/subscribe.on-sync-failed.cased: ""
notifications.argoproj.io/subscribe.on-health-degraded.cased: ""

Once integrated, you can:

  • Monitor deployments across all your ArgoCD applications
  • Get alerts when deployments fail or apps become unhealthy
  • Trigger runbooks automatically on deployment issues
  • Ask the AI agent about deployment history and patterns
  • Correlate ArgoCD deployments with GitHub commits and CI builds

Need help? Contact us at support@cased.com or open an issue on GitHub.