Reputation: 3699
I wanted to force the pods to restart if a configmap was modified, so I have added the following annotation in my deployment.yaml
:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/config.yml") . | sha256sum }}
It works perfectly.
I'd like to do it for all the files in my template folder.
Is there a way to do it? I have the impression we cannot iterate over the files located in the templates
folder.
Thanks for your help.
Upvotes: 2
Views: 754
Reputation: 3699
To make your pods restart for each deployment, you can add:
annotations:
timestamp: {{ now | quote }}
Upvotes: 1