title: trigger pod restart on configmap change
body: <p>I have a configmap file defined as follows</p>
  <pre><code>apiVersion: v1
  kind: ConfigMap
  metadata:
    name: {{ .Release.Name }}-dashboard-cm-conf
    namespace: {{ .Release.Namespace }}
  data:
  {{ (tpl (.Files.Glob &quot;conf/*&quot;).AsConfig . ) | indent 2 }}
  </code></pre>
  <p>As you can see above, it is taking up the content of the &quot;conf&quot; folder as a data.
  Everything works fine, however the issue is observed when i am trying to implement &quot;annotations&quot; to trigger a &quot;POD-restart&quot; with the below lines in my &quot;deployment file.</p>
  <pre><code>      annotations:
          checksum/config-map: {{ include (print .Template.BasePath &quot;/dashboard-conf-map.yaml&quot;) . | sha256sum }}
  
  </code></pre>
  <p>The POD is not getting restarted, even when content of &quot;conf&quot; folder is changed &amp;&amp; a &quot;helm upgrade&quot; is performed.</p>
  <p>If i use a simple configmap with data defined as below, a change in parameter and &quot;helm upgrade&quot; does result in POD-restart</p>
  <pre><code>data:
    parameter1: testparam1
    parameter2: testparam2
  </code></pre>
  <p>I have the following question in here</p>
  <ol>
  <li><p>Is there a way to perform checksum for the folder.</p>
  </li>
  <li><p>Is there a way get the output of linux-command like below in the configmap.</p>
  </li>
  </ol>
  <p><code>  find dashboard/conf/ -type f -exec md5sum {} \; |md5sum</code></p>
  <ol start="3">
  <li>Can we perform checksum for a non-YAML file.</li>
  </ol>
  <pre><code>      annotations:
          checksum: {{ include (print .Template.BasePath &quot;/logback-spring.xml&quot;) . | sha256sum }}
  
  </code></pre>
  <p>I get the below error
  Error: YAML parse error on chart-2/charts/dashboar/templates/conf1/logback-spring.xml: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type releaseutil.SimpleHead</p>
  <ol start="4">
  <li>Can we perform checksum on file one directory above the &quot;.Template.BasePath&quot;, i tried below combination all of them result in error.</li>
  </ol>
  <pre><code>checksum/config: {{ include (print .BasePath &quot;../conf/values1.yaml&quot;) . | sha256sum }}
  
  checksum/config: {{ include (print .Template.BasePath &quot;/../../conf/values1.yaml&quot;) . | sha256sum }}
  
  checksum/config: {{ include (print .Template.BasePath &quot;/../conf/values1.yaml&quot;) . | sha256sum }} 
  </code></pre>
  <p>error calling include: template: no template &quot;chart-2/charts/dashboard/templates../conf/values1.yaml&quot; associated with template &quot;gotpl&quot;</p>
  <p>error calling include: template: no template &quot;chart-2/charts/dashboard/templates/../conf/values1.yaml&quot; associated with template &quot;gotpl&quot;</p>
  <p>error calling include: template: no template &quot;chart-2/charts/dashboard/templates/../../conf/values1.yaml&quot; associated with template &quot;gotpl&quot;</p>