argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
18k stars 5.48k forks source link

Add a link between images and resources being deployed #20896

Open Aaron-9900 opened 19 hours ago

Aaron-9900 commented 19 hours ago

Summary

We (Datadog) have a product that uses Argo CD notifications in order to know when an Argo CD sync has happened, and provide additional observability to customers on those deployments inside Datadog. We would like to receive the images being deployed by each of the resources in an ArgoCD application on its notification webhook. Currently the notification sends an "images" array, but its not possible to link the images with the resources it relates to.

Motivation

In Datadog we are working on a CD Visibility product that provides insights into the deployments of customers, ArgoCD being one of the providers we support. One of the key pieces of information we would like to provide is the changes that occurred between one deployment and another. We are currently able to get the changed resources by looking at the sync message of each resource, yet currently there is no visibility into how the image changed for those resources. We think that providing this information is valuable not only for us in CD Visibility, but to any user consuming ArgoCD Notifications.

Proposal

  1. In SyncAppState add the images to the ResourceResult struct. I think we would need access to ApplicationTree in SyncAppState, although maybe there is a better way.
  2. Modify the CRD so that ResourceResult includes an Images array

Another possibility would be to modify GetSummary to add the images to the resources.

If the use case and the proposed solution seem reasonable, we are happy to contribute ourselves to the repository!

andrii-korotkov-verkada commented 17 hours ago

Seems reasonable to me.