argoproj-labs / argocd-notifications

Notifications for Argo CD
https://argocd-notifications.readthedocs.io/
Apache License 2.0
494 stars 140 forks source link

Display updated resources #92

Open Atharex opened 4 years ago

Atharex commented 4 years ago

Hi,

A question about Argo CD and updated resources. This information is available in {{ .app.status.operationState.syncResult.resources }}

It returns [map[group:machinelearning.seldon.io hookPhase:Running kind:SeldonDeployment message:seldondeployment.machinelearning.seldon.io/my-test-deployment configured name:my-test-deployment namespace:test status:Synced syncPhase:Sync version:v1alpha2]]

How can you access individual fields?
{{ .app.status.operationState.syncResult.resources.name }} for example returns an error, but I'd like to get the "my-test-deployment"

ryota-sakamoto commented 3 years ago

Hi @alexmt I guess .app.status.resources(status == OutOfSync) is more correctly that .app.status.operationState.syncResult.resources when the user just wants to send updated resources. Because maybe operationState is nearly same that is kubectl apply result, so it is not suitable this case.

What do you think?