<p>I wanted to force the pods to restart if a configmap was modified, so I have added the following annotation in my <code>deployment.yaml</code>:</p>
<pre><code>      annotations:
          checksum/config:   {{ include (print $.Template.BasePath &quot;/config.yml&quot;) . | sha256sum }}
</code></pre>
<p>It works perfectly.</p>
<p>I'd like to do it for all the files in my template folder.</p>
<p>Is there a way to do it? I have the impression we cannot iterate over the files located in the <code>templates</code> folder.</p>
<p>Thanks for your help.</p>

<p>To make your pods restart for each deployment, you can add:</p>
<pre><code>      annotations:
          timestamp: {{ now | quote }}
</code></pre>
