-
Notifications
You must be signed in to change notification settings - Fork 10
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
Backport of proxy-lifecycle: add HTTP Server with endpoints for proxy lifecycle shutdown into release/1.1.x #181
Merged
hc-github-team-consul-core
merged 34 commits into
release/1.1.x
from
backport/proxy-lcm/shutdown-http-endpoints/finally-probable-wolf
Jun 27, 2023
Merged
Conversation
This file contains 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
hc-github-team-consul-core
force-pushed
the
backport/proxy-lcm/shutdown-http-endpoints/finally-probable-wolf
branch
from
June 27, 2023 14:59
22cb303
to
51a6176
Compare
curtbushko
approved these changes
Jun 27, 2023
hc-github-team-consul-core
deleted the
backport/proxy-lcm/shutdown-http-endpoints/finally-probable-wolf
branch
June 27, 2023 15:53
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backport
This PR is auto-generated from #115 to be assessed for backporting due to the inclusion of the label backport/1.1.
The below text is copied from the body of the original PR.
Refs hashicorp/consul-k8s#536, hashicorp/consul-k8s#650
Adds a proxy lifecycle management server and starts it from the consul-dataplane main process. This server exposes an HTTP endpoint (configurable, defaulting to
/graceful_shutdown
on port 20300) to optionally start draining inbound (external) connections to the managed Envoy proxy, while allowing outbound requests from the application for which this proxy is acting as a sidecar to continue, up to a configurable grace period timeout, to facilitate application shutdown.Refactors the
envoy
package proxy manager to introduce new states (stateDraining
andstateExited
) and new methods (Drain()
,Quit()
and renamingStop()
toKill()
to avoid confusion and better describe the actual implementation) and implement an interface to allow a mock implementation for testing the lifecycle management server in isolation.Notes for reviewers
/graceful_shutdown
endpoint explicitly (which will be necessary for handling job termination from apreStop
hook) in the future.envoy
package does not have proper test coverage yet - I'm hoping to add this as a followup by replacing the currentfake-envoy
implementation with a Go-based version to include an HTTP server mocking the/drain_listeners
and/quitquitquit
Envoy admin API endpoints.envoyExtraArgs
refactor will likely conflict with fix: log level present in extra args using envoy-extra-args annotation : NET-2190 #133 and need to be resolvedLinks
Overview of commits