How to apply patches or any metadata changes in Pods

We have our software deployed on kubenetes as deployments.

Timezone patches for the Operating System are released based on the following conditions and scenarios:

  • DST or other time zone policy changes on the respective region.
  • or incase of any vulnerability in the existing patches

These files are placed at /usr/share/zoneinfo.
As content of these files are frequently changed.

What should be the best approach to updated these files.
One option is to update image whenever there is the changes in timezone data.

Another is to update the files manually inside pods. but it will be gone once pod restarts.

Please suggest what could be the best way to update.

If the total size of your files does not exceeds 1mo, you can create a configmap with the content of these files, then mount this configmap into your Pods, in the /usr/share/zoneinfo directory.