<p>I am trying to setup CI using Azure DevOps and CD using GitOps for my AKS cluster. When CI completes the image is pushed to Azure Container Registry. My issue is the name of the image in my yaml file is :latest. When I push the image to container registry, Flux CD is not able to determine if there are any changes to the image or not because the name of the image remains same. I tried to look up the issue in github and came up with the below link:
<a href="https://github.com/GoogleCloudPlatform/cloud-builders/issues/22#issuecomment-316181326" rel="nofollow noreferrer">https://github.com/GoogleCloudPlatform/cloud-builders/issues/22#issuecomment-316181326</a>
But I dont know how to implement it. Can someone please help me?</p>

<p>We had the similar issue and we fixed it by adding the checksum to the annotation in the deployment file with a unique value generator. It works like this for us:</p>
<p>Generate Helm Template -&gt; Deployment manifest is created with unique checksum -&gt; Trigger deployment.</p>
<p>We had the RollingUpdate enabled in our manifest which eliminated the downtime of the application. Below is our helm template config.
deployment.yaml</p>
<pre class="lang-yaml prettyprint-override"><code>  template:
    metadata:
      labels:
        app: {{ .Values.appName }}
      annotations:
        checksum/commonconfig: {{ .Values.CommonConfig | toJson | sha256sum | trunc 63 }}
        checksum/podconfig: {{ .Values.PodConfig | toJson | sha256sum | trunc 63 }}
</code></pre>
<p>We have this in the helm chart which will generate the unique value in the deployment manifest. This will make the deployment to happen everytime even the latest tag of image is the same. Also, have the imagePullPolicy as Always.</p>
