Added checksums to configmaps to enable pod restart on configmap change. #18611
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Currently when you modify the configmap (like adding a new env variable), or change the value of an env variable (change the value in a values.yaml), the pod will not be restarted and you have to manually do a rollout restart. This can introduce a configuration mismatch and it is not in line with k8s/helm philosophy. A change in the config should automatically issue a restart.
This PR adds a checksum value in an annotation so that if the configmap changes, the spec of the pod will also change and k8s will trigger a restart. This is a documented way (see Automatically Roll Deployments section) of fixing that issue.
What issues does this PR fix or reference?
Fixes the issue reverted by this PR: #18603
How to test this PR?
Using the helm installer, simply change a value that is used in the configmap and the che pod (or the plugin/devfile registries) should restart.
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.