Skip to content
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

Envoy PreStop hook support #312

Merged
merged 2 commits into from Jul 15, 2020
Merged

Envoy PreStop hook support #312

merged 2 commits into from Jul 15, 2020

Conversation

achevuru
Copy link
Contributor

@achevuru achevuru commented Jul 13, 2020

Issue #, if available:
#288
Description of changes:

Support for a configurable pre-stop delay for Envoy containers.

  • Will help with keeping envoy up and running until the app container goes down. Sidecar feature in K8S 1.18 will address this natively.
  • Delay also helps to account for the time it takes for the pod down event to propagate to the remaining envoys in the Mesh.
  • Default value of 20 sec is based on some internal tests and specifically tuned for CloudMap based ServiceDiscovery mode and can be adjusted higher based on the scale. Value can be adjusted lower for DNS scenarios.
  • If preStop delay is set to a value greater than 30 secs, then terminationGracePeriodSeconds in the pod spec (spec.terminationGracePeriodSeconds) has to be adjusted accordingly. If not adjusted, Pod will be killed(via SIGKILL) prior to the completion of envoy preStop hook as the default value of terminationGracePeriodSeconds is 30.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@fawadkhaliq
Copy link

If preStop delay is set to a value greater than 30 secs, then terminationGracePeriodSeconds has to be adjusted accordingly

Looks good overall. In the description, can we please elaborate more on the 30 seconds with specifics. Why and where terminationGracePeriodSeconds needs to be changed. A sample pod spec would be great! Will be helpful for the users and anyone updating documentation

@fawadkhaliq fawadkhaliq merged commit f5aecef into aws:master Jul 15, 2020
@achevuru achevuru mentioned this pull request Jul 15, 2020
@achevuru achevuru deleted the envoy_prestop branch October 19, 2020 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants