-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
fix: Graceful shutdown for the API server (#18642) #20981
fix: Graceful shutdown for the API server (#18642) #20981
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
fd682a9
to
ac80298
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20981 +/- ##
==========================================
+ Coverage 55.02% 55.24% +0.21%
==========================================
Files 324 324
Lines 55472 55572 +100
==========================================
+ Hits 30522 30699 +177
+ Misses 22329 22257 -72
+ Partials 2621 2616 -5 ☔ View full report in Codecov by Sentry. |
8280700
to
a8ca06a
Compare
badea03
to
240c2d5
Compare
Signed-off-by: Andrii Korotkov <[email protected]>
Signed-off-by: Andrii Korotkov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you!
…20981) * fix: Graceful shutdown for the API server (argoproj#18642) Closes argoproj#18642 Implements a graceful shutdown the the API server. Without this, ArgoCD API server will eventually return 502 during rolling update. However, healthcheck would return 503 if the server is terminating. Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]> * Init server only once, but keep re-initializing listeners Signed-off-by: Andrii Korotkov <[email protected]> * Check error for SetParamInSettingConfigMap as needed after fresh master Signed-off-by: Andrii Korotkov <[email protected]> * Prevent a data race Signed-off-by: Andrii Korotkov <[email protected]> * Remove unused variable, don't pass lock when not necessary Signed-off-by: Andrii Korotkov <[email protected]> * Try overriding URL instead of additional URLs Signed-off-by: Andrii Korotkov <[email protected]> * Use a more specific url Signed-off-by: Andrii Korotkov <[email protected]> --------- Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]> Signed-off-by: Adrian Aneci <[email protected]>
* fix: Graceful shutdown for the API server (#18642) Closes #18642 Implements a graceful shutdown the the API server. Without this, ArgoCD API server will eventually return 502 during rolling update. However, healthcheck would return 503 if the server is terminating. Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]> * Init server only once, but keep re-initializing listeners Signed-off-by: Andrii Korotkov <[email protected]> * Check error for SetParamInSettingConfigMap as needed after fresh master Signed-off-by: Andrii Korotkov <[email protected]> * Prevent a data race Signed-off-by: Andrii Korotkov <[email protected]> * Remove unused variable, don't pass lock when not necessary Signed-off-by: Andrii Korotkov <[email protected]> * Try overriding URL instead of additional URLs Signed-off-by: Andrii Korotkov <[email protected]> * Use a more specific url Signed-off-by: Andrii Korotkov <[email protected]> --------- Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]>
/cherry-pick release-2.13 |
* fix: Graceful shutdown for the API server (#18642) Closes #18642 Implements a graceful shutdown the the API server. Without this, ArgoCD API server will eventually return 502 during rolling update. However, healthcheck would return 503 if the server is terminating. Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]> * Init server only once, but keep re-initializing listeners Signed-off-by: Andrii Korotkov <[email protected]> * Check error for SetParamInSettingConfigMap as needed after fresh master Signed-off-by: Andrii Korotkov <[email protected]> * Prevent a data race Signed-off-by: Andrii Korotkov <[email protected]> * Remove unused variable, don't pass lock when not necessary Signed-off-by: Andrii Korotkov <[email protected]> * Try overriding URL instead of additional URLs Signed-off-by: Andrii Korotkov <[email protected]> * Use a more specific url Signed-off-by: Andrii Korotkov <[email protected]> --------- Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]>
…rgoproj#20981)" This reverts commit 730363f. Signed-off-by: Michael Crenshaw <[email protected]>
…rgoproj#20981)" This reverts commit 730363f.
…20981) * fix: Graceful shutdown for the API server (argoproj#18642) Closes argoproj#18642 Implements a graceful shutdown the the API server. Without this, ArgoCD API server will eventually return 502 during rolling update. However, healthcheck would return 503 if the server is terminating. Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]> * Init server only once, but keep re-initializing listeners Signed-off-by: Andrii Korotkov <[email protected]> * Check error for SetParamInSettingConfigMap as needed after fresh master Signed-off-by: Andrii Korotkov <[email protected]> * Prevent a data race Signed-off-by: Andrii Korotkov <[email protected]> * Remove unused variable, don't pass lock when not necessary Signed-off-by: Andrii Korotkov <[email protected]> * Try overriding URL instead of additional URLs Signed-off-by: Andrii Korotkov <[email protected]> * Use a more specific url Signed-off-by: Andrii Korotkov <[email protected]> --------- Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]>
* fix: Graceful shutdown for the API server (#18642) (#20981) * fix: Graceful shutdown for the API server (#18642) Closes #18642 Implements a graceful shutdown the the API server. Without this, ArgoCD API server will eventually return 502 during rolling update. However, healthcheck would return 503 if the server is terminating. Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]> * Init server only once, but keep re-initializing listeners Signed-off-by: Andrii Korotkov <[email protected]> * Check error for SetParamInSettingConfigMap as needed after fresh master Signed-off-by: Andrii Korotkov <[email protected]> * Prevent a data race Signed-off-by: Andrii Korotkov <[email protected]> * Remove unused variable, don't pass lock when not necessary Signed-off-by: Andrii Korotkov <[email protected]> * Try overriding URL instead of additional URLs Signed-off-by: Andrii Korotkov <[email protected]> * Use a more specific url Signed-off-by: Andrii Korotkov <[email protected]> --------- Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]> * Use a custom signal for graceful restart Signed-off-by: Andrii Korotkov <[email protected]> * Re-run tests Signed-off-by: Andrii Korotkov <[email protected]> --------- Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]>
* fix: Graceful shutdown for the API server (#18642) (#20981) * fix: Graceful shutdown for the API server (#18642) Closes #18642 Implements a graceful shutdown the the API server. Without this, ArgoCD API server will eventually return 502 during rolling update. However, healthcheck would return 503 if the server is terminating. Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]> * Init server only once, but keep re-initializing listeners Signed-off-by: Andrii Korotkov <[email protected]> * Check error for SetParamInSettingConfigMap as needed after fresh master Signed-off-by: Andrii Korotkov <[email protected]> * Prevent a data race Signed-off-by: Andrii Korotkov <[email protected]> * Remove unused variable, don't pass lock when not necessary Signed-off-by: Andrii Korotkov <[email protected]> * Try overriding URL instead of additional URLs Signed-off-by: Andrii Korotkov <[email protected]> * Use a more specific url Signed-off-by: Andrii Korotkov <[email protected]> --------- Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]> * Use a custom signal for graceful restart Signed-off-by: Andrii Korotkov <[email protected]> * Re-run tests Signed-off-by: Andrii Korotkov <[email protected]> --------- Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]>
* fix: Graceful shutdown for the API server (#18642) (#20981) * fix: Graceful shutdown for the API server (#18642) Closes #18642 Implements a graceful shutdown the the API server. Without this, ArgoCD API server will eventually return 502 during rolling update. However, healthcheck would return 503 if the server is terminating. * Init server only once, but keep re-initializing listeners * Check error for SetParamInSettingConfigMap as needed after fresh master * Prevent a data race * Remove unused variable, don't pass lock when not necessary * Try overriding URL instead of additional URLs * Use a more specific url --------- * Use a custom signal for graceful restart * Re-run tests --------- Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]>
…rgoproj#20981)" (argoproj#21221) Signed-off-by: Brett C. Dudo <[email protected]>
) * fix: Graceful shutdown for the API server (argoproj#18642) (argoproj#20981) * fix: Graceful shutdown for the API server (argoproj#18642) Closes argoproj#18642 Implements a graceful shutdown the the API server. Without this, ArgoCD API server will eventually return 502 during rolling update. However, healthcheck would return 503 if the server is terminating. Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]> * Init server only once, but keep re-initializing listeners Signed-off-by: Andrii Korotkov <[email protected]> * Check error for SetParamInSettingConfigMap as needed after fresh master Signed-off-by: Andrii Korotkov <[email protected]> * Prevent a data race Signed-off-by: Andrii Korotkov <[email protected]> * Remove unused variable, don't pass lock when not necessary Signed-off-by: Andrii Korotkov <[email protected]> * Try overriding URL instead of additional URLs Signed-off-by: Andrii Korotkov <[email protected]> * Use a more specific url Signed-off-by: Andrii Korotkov <[email protected]> --------- Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]> * Use a custom signal for graceful restart Signed-off-by: Andrii Korotkov <[email protected]> * Re-run tests Signed-off-by: Andrii Korotkov <[email protected]> --------- Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]> Signed-off-by: Brett C. Dudo <[email protected]>
…20981) * fix: Graceful shutdown for the API server (argoproj#18642) Closes argoproj#18642 Implements a graceful shutdown the the API server. Without this, ArgoCD API server will eventually return 502 during rolling update. However, healthcheck would return 503 if the server is terminating. Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]> * Init server only once, but keep re-initializing listeners Signed-off-by: Andrii Korotkov <[email protected]> * Check error for SetParamInSettingConfigMap as needed after fresh master Signed-off-by: Andrii Korotkov <[email protected]> * Prevent a data race Signed-off-by: Andrii Korotkov <[email protected]> * Remove unused variable, don't pass lock when not necessary Signed-off-by: Andrii Korotkov <[email protected]> * Try overriding URL instead of additional URLs Signed-off-by: Andrii Korotkov <[email protected]> * Use a more specific url Signed-off-by: Andrii Korotkov <[email protected]> --------- Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]>
) * fix: Graceful shutdown for the API server (argoproj#18642) (argoproj#20981) * fix: Graceful shutdown for the API server (argoproj#18642) Closes argoproj#18642 Implements a graceful shutdown the the API server. Without this, ArgoCD API server will eventually return 502 during rolling update. However, healthcheck would return 503 if the server is terminating. Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]> * Init server only once, but keep re-initializing listeners Signed-off-by: Andrii Korotkov <[email protected]> * Check error for SetParamInSettingConfigMap as needed after fresh master Signed-off-by: Andrii Korotkov <[email protected]> * Prevent a data race Signed-off-by: Andrii Korotkov <[email protected]> * Remove unused variable, don't pass lock when not necessary Signed-off-by: Andrii Korotkov <[email protected]> * Try overriding URL instead of additional URLs Signed-off-by: Andrii Korotkov <[email protected]> * Use a more specific url Signed-off-by: Andrii Korotkov <[email protected]> --------- Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]> * Use a custom signal for graceful restart Signed-off-by: Andrii Korotkov <[email protected]> * Re-run tests Signed-off-by: Andrii Korotkov <[email protected]> --------- Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Leonardo Luz Almeida <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]>
Closes #18642
fix #18576
Implements a graceful shutdown the the API server. Without this, ArgoCD API server will eventually return 502 during rolling update. However, healthcheck would return 503 if the server is terminating.
Checklist: