ArgoCD
ArgoCD is a declarative, GitOps continuous delivery tool for Kubernetes. You can use ArgoCD to drive insights into values such as:
Deploys
Setup
Notification webhooks
To send Cortex information about syncs in ArgoCD, you can use ArgoCD notification Webhooks to call the Cortex flexible deploy REST endpoint.
Here is an example of what a argocd-notifications-cm
config map may look like:
The above example assumes your ArgoCD application's name matches the x-cortex-tag
. In this case, each application in ArgoCD can subscribe to the same trigger.
If your application name doesn't match the x-cortex-tag
, add a value/pair to the info section of the Application manifest. Then, instead of using .app.metadata.name
in the url, use .app.spec.info[0].value
.
Subscribing application to webhooks
The last step is to subscribe your application to the webhook. You do this by adding a label annotation in the Application spec in the following format:
For example, if we want to subscribe an application to the example webhook above, our Application yaml may look something like this:
Troubleshooting
Ensure the Cortex API Key is encoded correctly
Make sure the encoded Cortex API Key does not contain an extra line. Use a tool like https://www.base64encode.org/ to ensure your encoded key does not contain an extra line.
Check the ArgoCD logs
The notification webhook is managed by the argocd-notifications-controller
which will have a pod running in your ArgoCD namespace.
Assuming the ArgoCD is running in the argocd
namepsace, run the following command to get the list of pods:
kubectl get pods -n argocd
This will return a list of pods similar to the ones listed below:
In this example, the pod managing the webhook notifications is argocd-notifications-controller-6cd988b564-sql55
. To get the logs, run the following command:
kubectl logs argocd-notifications-controller-6cd988b564-sql55 -n argocd
If your trigger was successful, you should seem something similar to this:
Still need help?
The following options are available to get assistance from the Cortex Customer Engineering team:
Email: help@cortex.io, or open a support ticket in the in app Resource Center
Chat: Available in the Resource Center
Slack: Users with a connected Slack channel will have a workflow added to their account. From here, you can either @CortexTechnicalSupport or add a
:ticket:
reaction to a question in Slack, and the team will respond directly.
Don’t have a Slack channel? Talk with your Customer Success Manager.
Last updated