-
Notifications
You must be signed in to change notification settings - Fork 36
Adding strategy type of RollingUpdate to prevent session doubling during deployments #711
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #711 +/- ##
==========================================
- Coverage 48.77% 48.65% -0.13%
==========================================
Files 95 95
Lines 10600 10600
==========================================
- Hits 5170 5157 -13
- Misses 5071 5077 +6
- Partials 359 366 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jonstacks
reviewed
Nov 12, 2025
sabrina-ngrok
commented
Nov 13, 2025
jonstacks
reviewed
Nov 13, 2025
jonstacks
reviewed
Nov 25, 2025
jonstacks
approved these changes
Dec 1, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
#266
What
Redeploys or restarts never complete if ngrok sessions are limited to 1
How
Changes made: https://ampcode.com/threads/T-a0987420-692d-47c2-b885-0d2c7456b717
agent/deployment.yaml - Added rolling update strategy with maxSurge: 0 and maxUnavailable: 1 to prevent session doubling during deployments
values.yaml - Added default agent.lifecycle PreStop hook that sleeps for 15 seconds, giving ngrok time to gracefully disconnect
agent/deployment.yaml - Updated lifecycle reference to use agent.lifecycle with fallback to global lifecycle
This ensures old pods disconnect from ngrok before new ones start, preventing session limit issues during redeploys.
Created agent-deployment_test.yaml with tests that verify:
✅ Rolling update strategy has maxSurge: 0 and maxUnavailable: 1
✅ Default lifecycle PreStop hook sleeps for 15 seconds
✅ Global lifecycle value overrides agent.lifecycle when set
✅ Default terminationGracePeriodSeconds is 30
✅ Custom terminationGracePeriodSeconds can be configured
✅ Agent deployment not created when ingress.enabled: false
Breaking Changes
[None that I know of :)]