Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid creating multiple config maps #9

Open
sergiimk opened this issue Nov 10, 2023 · 2 comments
Open

Avoid creating multiple config maps #9

sergiimk opened this issue Nov 10, 2023 · 2 comments

Comments

@sergiimk
Copy link
Member

Our current pattern of creating new config maps with sha name suffixes is unnecessarily complex.

We should adopt this annotation-based solution to trigger pod restarts on config map changes.

@sergiimk
Copy link
Member Author

@romcheg @cutwater I remembered why at my past job we ended up with this pattern. Some automation tools were not guaranteeing us that configmap file is applied in k8s first, before the deployment, so we often were ending up restarting the app pods only for them to read the old version of the configmap.

Does modern helm / helmfile prevent this from happening?

@romcheg
Copy link
Contributor

romcheg commented Nov 11, 2023

When upgrading a release Helm renders manifests in the particular order defined here. In that order, ConfigMaps are rendered before Pods or other manifests that create them, e.g., Deployments or Jobs. Later it preserves that order while creating or upgrading resources.

Patching ConfigMaps and then using its hashsums in the pods' annotation should be sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants