Skip to content

Incorrect Image Tag in Notifications & UTC to IST Time Conversion #367

@mahira2121

Description

@mahira2121

Hi,
I have implemented logic to include the new image tag in the notification when ArgoCD successfully syncs an application. However, sometimes the notification still shows the previous image tag instead of the updated one. The logic used for extracting the image tag is:

{
  "title": "Image Tag",
  "value": "{{ `{{ $image := index .app.status.summary.images 0 }}` }}{{ `{{ $parts := split ":" $image }}{{ $parts._1 }}` }}",
  "short": true
}

Despite ensuring the logic fetches the latest image, the old tag appears intermittently. What could be causing this issue?
Additionally, I want to convert the
startedAt and finishedAt timestamps from UTC to IST in the notification. The current implementation is:

{
  "title": "Finished At",
  "value": "{{ `{{ .app.status.operationState.finishedAt }}` }}",
  "short": true
},
{
  "title": "Started At",
  "value": "{{ `{{ .app.status.operationState.startedAt }}` }}",
  "short": true
}

How can I ensure that these timestamps are correctly converted to IST before being displayed in the notification?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions