Is it possible to configMap checksum in a normal deployment file(Non HELM)?

419 Views Asked by At

I have a small application with one deployment, service and 3 configMaps. It is normal Kubernetes YAML files, not a HELM setup. Is it possible to add the configMap checksum in annotations just like we can do in HELM so that whenever the configMap get updated, the deployment gets restarted.

HELM Reference: https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments

Any help will be appreciated. Thanks in advance!

1

There are 1 best solutions below

0
Raghu On

You will need to use a "ConfigMap Reloader".

Stakater Reloader is a Kubernetes Controller which can watch changes in ConfigMap and Secret and do rolling upgrades on Pods with their associated DeploymentConfigs, Deployments, Daemonsets Statefulsets and Rollouts.

Please refer to these links

  1. https://github.com/stakater/Reloader
  2. https://medium.com/linux-shots/configmap-secret-reloader-automatically-add-reload-data-from-configmap-secret-to-deployments-dc245e06b92c