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

Add configurable preStop delay to Envoy sidecar #911

Closed

Conversation

hamishforbes
Copy link
Contributor

Changes proposed in this PR:

  • Add a new annotation consul.hashicorp.com/sidecar-proxy-prestop-delay
  • Pods with this annotation have a Lifecycle hook added to delay the Envoy proxy sidecar shutdown by the specified number of seconds

Should probably be some validation on the value of the annotation, atm this would allow random command injection to the sidecar container on shutdown

How I've tested this PR:

How I expect reviewers to test this PR:

Checklist:

  • Tests added
  • CHANGELOG entry added

    HashiCorp engineers only, community PRs should not add a changelog entry.
    Entries should use present tense (e.g. Add support for...)

Related: #650

@david-yu
Copy link
Contributor

david-yu commented Mar 7, 2022

Thanks for the PR. We'd like to support a more graceful way of shutting down Envoy so that if the is still running Envoy shuts down after the app is shut down first. We will take this into consideration for future development of this feature.

I'm curious is this workaround working well in your environment?

@hamishforbes
Copy link
Contributor Author

Yeah for sure, it's not a particularly elegant solution!

I've been running a fork with this patch and a couple of other tweaks in production since opening the PR though, works perfectly for me.

@hashicorp-cla
Copy link

hashicorp-cla commented Mar 12, 2022

CLA assistant check
All committers have signed the CLA.

@dschaaff
Copy link

I'd also note that I'm running a fork with the changes in this pull request. This feature really needs to get prioritized. There is no way to do rolling deployments without 5xx errors due to the envoy sidecar stopping before the appliation container completes.

@narendrapatel
Copy link

We are also testing this changes as we have some very high traffic apps and any issues gets quickly noticed and reported. A solution to this feature would be really helpful.

@alt-dima
Copy link

Can't understand, how Consul Connect/Mesh can be used in production without this?

@natitomattis
Copy link

natitomattis commented Oct 24, 2022

We also have the same issue, we created this fork since our version (0.45.0) is behind main. We validated that adding the preStop hook fixed the problem.

@david-yu
Copy link
Contributor

Closing as this is now resolved by #2233 and will be released in upcoming patch releases for 1.0.x, 1.1.x and 1.2.x.

@david-yu david-yu closed this Jun 27, 2023
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.

7 participants