Restart the deployment when ConfigMaps are changed #5240
-
Is it possible with fluxcd to restart the deployment when ConfigMaps are changed for the changes to take effect? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes, by using a Kustomize configMapGenerator. It appends a suffix to the ConfigMap name with a hash of the content, so whenever you change the content, the name will change as well and cause the Deployment to create a new ReplicaSet: https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/#configmapgenerator |
Beta Was this translation helpful? Give feedback.
-
Thank you very much. |
Beta Was this translation helpful? Give feedback.
Yes, by using a Kustomize configMapGenerator. It appends a suffix to the ConfigMap name with a hash of the content, so whenever you change the content, the name will change as well and cause the Deployment to create a new ReplicaSet:
https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/#configmapgenerator