-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
chore: Graceful shutdown for API Server (redo) (#18642) #21224
chore: Graceful shutdown for API Server (redo) (#18642) #21224
Conversation
…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 <andrii.korotkov@verkada.com> Co-authored-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Init server only once, but keep re-initializing listeners Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> * Check error for SetParamInSettingConfigMap as needed after fresh master Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> * Prevent a data race Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> * Remove unused variable, don't pass lock when not necessary Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> * Try overriding URL instead of additional URLs Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> * Use a more specific url Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> --------- Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> Co-authored-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21224 +/- ##
==========================================
+ Coverage 55.03% 55.17% +0.14%
==========================================
Files 338 338
Lines 57075 57167 +92
==========================================
+ Hits 31410 31543 +133
+ Misses 22968 22923 -45
- Partials 2697 2701 +4 ☔ View full report in Codecov by Sentry. |
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.
Tks for the fix.
Added a minor comment.
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
/cherry-pick release-2.14 |
* 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 <andrii.korotkov@verkada.com> Co-authored-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Init server only once, but keep re-initializing listeners Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> * Check error for SetParamInSettingConfigMap as needed after fresh master Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> * Prevent a data race Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> * Remove unused variable, don't pass lock when not necessary Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> * Try overriding URL instead of additional URLs Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> * Use a more specific url Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> --------- Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> Co-authored-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Use a custom signal for graceful restart Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> * Re-run tests Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> --------- Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> Co-authored-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
* 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 <andrii.korotkov@verkada.com> Co-authored-by: Andrii Korotkov <137232734+andrii-korotkov-verkada@users.noreply.github.com> Co-authored-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
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.
Checklist: