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

Auto restart deployment on config change #450

Merged
merged 2 commits into from
May 2, 2024

Conversation

joeshannon
Copy link
Contributor

@joeshannon joeshannon commented May 2, 2024

Add new restartOnConfigChange property.

This will cause the deployment to be restarted if the config is changed,
e.g. the set of plans or device modules are updated, when running
helm upgrade.

Use a variation of approach at:
https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments

Fixes 451.

Copy link

codecov bot commented May 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.16%. Comparing base (25e9028) to head (8a5d215).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #450   +/-   ##
=======================================
  Coverage   90.16%   90.16%           
=======================================
  Files          41       41           
  Lines        1708     1708           
=======================================
  Hits         1540     1540           
  Misses        168      168           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joeshannon joeshannon marked this pull request as ready for review May 2, 2024 11:11
This will cause the deployment to be restarted if the config is changed,
e.g. the set of plans or device modules are updated, when running
helm upgrade.
@joeshannon joeshannon force-pushed the deployment-reload-on-config-change branch from b296060 to 7bf3c88 Compare May 2, 2024 12:34
@joeshannon joeshannon changed the title Auto restart pod on config change Auto restart deployment on config change May 2, 2024
Copy link
Contributor

@DiamondJoseph DiamondJoseph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performs how I'd expect it to (helm upgrade with changes to the configmap.yaml deploys the updated ConfigMap, causes the Deployment to become outdated and be re-deployed). Does require that changes to the ConfigMap are done through Helm upgrade, but that's something we should enforce anyway.

We don't seem to have a github issue for this

@joeshannon joeshannon merged commit 9964a65 into main May 2, 2024
24 checks passed
@joeshannon joeshannon deleted the deployment-reload-on-config-change branch May 2, 2024 13:52
ZohebShaikh pushed a commit that referenced this pull request May 7, 2024
Add new restartOnConfigChange property.

This will cause the deployment to be restarted if the config is changed,
e.g. the set of plans or device modules are updated, when running
helm upgrade.

Use a variation of approach at:

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

Fixes 451.
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

Successfully merging this pull request may close these issues.

2 participants