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 of #3435
Description
Add a set of helm options to support performing a "graceful shutdown" of envoy when gloo is sitting behind external loadbalancers that are outside of the Kubernetes context.
The main functionality is provided via a k8s
preStop
hook which will be called prior to the envoy pod being terminated. This hook will first call the envoy admin interface to explicitly begin failing healthchecks (that have been configured via the health check filter), and then sleep for a certain, customized amount of time.This sleep period will allow for envoy to fail the healthchecks that the external loadbalancers are relying on, causing the envoy instance to be removed as a healthy endpoint, while still able to handle existing requests, etc.
Context
For example, when using an AWS ALB with target groups of envoy proxies running inside an EKS cluster, there is no way to remove/drain an envoy instance for the ALB without abruptly killing the instance and eventually letting the ALB figure this out via failing healthchecks.
This feature allows users to do the following:
Checklist:
make install-go-tools generated-code
to ensure there will be no code diffBOT NOTES:
resolves Provide option for graceful shutdown #3308