<p>While running kubernetes clusters, I've noticed that when a secret's value is changed <a href="https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets-as-environment-variables" rel="nofollow noreferrer">pods that use it as an environment variable</a> are <em>not</em> rebuilt and my applications <em>don't</em> receive a <code>SIGTERM</code> event.</p>

<p>While I know it's technically possible to update the environment of a running process using something like <a href="https://www.gnu.org/s/gdb/" rel="nofollow noreferrer">gdb</a>, this is a horrible thing to do and I assume k8s doesn't do this.</p>

<p>Is there a signal that is sent to an effected process when this situation occurs, or some other way to handle this?</p>

<p>No, nor does any such thing happen on <code>ConfigMap</code> mounts, env-var injection, or any other situation; signals are sent to your process only as a side-effect of Pod termination</p>

<p>There are <a href="https://duckduckgo.com/?q=kubernetes+reload+configmap+secret&amp;atb=v73-4_q&amp;ia=web" rel="nofollow noreferrer">innumerable</a> solutions to <a href="https://github.com/stakater/Reloader#readme" rel="nofollow noreferrer">do rolling update on <code>ConfigMap</code> or <code>Secret</code> change</a> but you have to configure what you would want your cluster to do and under what circumstances, because there is no way that a one-size-fits-all solution would work in all the ways that kubernetes is used in the world</p>
