How can we iterate over the files located in the `templates` folder with helm?

Viewed 494

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.

1 Answers

To make your pods restart for each deployment, you can add:

      annotations:
          timestamp: {{ now | quote }}
Related