<p>Is there a way to execute some code in pod containers when config maps are updated via helm. Preferrably without a custom sidecar doing constant file watching?</p>
<p>I am thinking along the lines of postStart and preExit lifecycle events of Kubernetes, but in my case a &quot;postPatch&quot;.</p>

<p>This might be something a <code>post-install</code> or <code>post-upgrade</code> hook would be perfect for:</p>
<p><a href="https://helm.sh/docs/topics/charts_hooks/" rel="nofollow noreferrer">https://helm.sh/docs/topics/charts_hooks/</a></p>
<p>You can trigger these jobs to start after an install (<code>post-install</code>) and/or after an upgrade (<code>post-upgrade</code>) and they will run to completion before the chart is considered installed or upgraded.</p>
<p>So you can to the upgrade, then as part of that upgrade, the hook would trigger after the update and run your update code. I know the <a href="https://kubernetes.github.io/ingress-nginx/deploy/#quick-start" rel="nofollow noreferrer">nginx ingress controller</a> chart does something like this.</p>
