ArgoCD Integration
Monitor and manage Kubernetes deployments from ArgoCD in Cased
ArgoCD Integration Guide
Section titled “ArgoCD Integration Guide”Cased can receive deployment events from ArgoCD to monitor your Kubernetes deployments automatically. This guide will help you set up the integration.
Quick Start (2 minutes)
Section titled “Quick Start (2 minutes)”Step 1: Get Your Setup Configuration
Section titled “Step 1: Get Your Setup Configuration”# Get your personalized ArgoCD configurationcurl -H "Authorization: Bearer YOUR_API_KEY" https://app.cased.com/api/v1/argocd/setup
This returns a complete YAML configuration customized for your organization.
Step 2: Apply the Configuration
Section titled “Step 2: Apply the Configuration”Save the configuration to a file and apply it:
kubectl apply -f argocd-comet-notifications.yaml -n argocd
Or use our one-liner setup script:
curl -H "Authorization: Bearer YOUR_API_KEY" https://app.cased.com/api/v1/argocd/setup | \ jq -r '.setup_script' | bash
Step 3: Annotate Your Applications
Section titled “Step 3: Annotate Your Applications”Add these annotations to your ArgoCD Applications:
apiVersion: argoproj.io/v1alpha1kind: Applicationmetadata: 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.
What Gets Tracked
Section titled “What Gets Tracked”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)
How It Works
Section titled “How It Works”- ArgoCD triggers notifications when applications change state
- Notifications are sent to Cased’s webhook endpoint
- Cased creates deployment events and triggers monitoring workflows
- Your team gets notified via Slack/email about deployment status
- AI agents can respond to issues automatically
Manual Configuration (Advanced)
Section titled “Manual Configuration (Advanced)”If you prefer to configure manually, create this ConfigMap:
apiVersion: v1kind: ConfigMapmetadata: name: argocd-notifications-cm namespace: argocddata: # 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]
Testing the Integration
Section titled “Testing the Integration”Test Webhook Connectivity
Section titled “Test Webhook Connectivity”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" } } } }'
Verify in Cased
Section titled “Verify in Cased”- Go to your Cased dashboard
- Navigate to Deployments
- You should see ArgoCD deployments with the “ArgoCD” trigger type
Troubleshooting
Section titled “Troubleshooting”Events Not Appearing
Section titled “Events Not Appearing”-
Check ArgoCD notifications controller logs:
Terminal window kubectl logs -n argocd deployment/argocd-notifications-controller -
Verify the ConfigMap is loaded:
Terminal window kubectl get cm argocd-notifications-cm -n argocd -o yaml -
Ensure your application has the correct annotations:
Terminal window kubectl get application YOUR_APP -n argocd -o yaml | grep notifications
Repository Not Found
Section titled “Repository Not Found”If you see “repository not found” errors, ensure:
- The repository exists in Cased
- The
cased.com/repository
annotation matches exactly - Format is
owner/repo
(e.g.,myorg/myapp
)
Testing Notifications
Section titled “Testing Notifications”You can manually trigger a test notification:
kubectl exec -it deployment/argocd-notifications-controller -n argocd -- \ argocd-notifications template notify cased-sync YOUR_APP \ --recipient webhook:cased
Security Considerations
Section titled “Security Considerations”- 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
Advanced Use Cases
Section titled “Advanced Use Cases”Multi-Cluster Deployments
Section titled “Multi-Cluster Deployments”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"
Custom Metadata
Section titled “Custom Metadata”Add any custom metadata you want tracked:
annotations: cased.com/repository: "owner/repo" cased.com/team: "platform" cased.com/cost-center: "engineering"
Selective Event Filtering
Section titled “Selective Event Filtering”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: ""
Integration with Cased Features
Section titled “Integration with Cased Features”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
Support
Section titled “Support”Need help? Contact us at support@cased.com or open an issue on GitHub.