From 8b0820aa2746c9211eec83c06be938c2f8d6278e Mon Sep 17 00:00:00 2001 From: santoshpulluri Date: Tue, 28 Apr 2026 04:53:30 +0000 Subject: [PATCH] backport of commit 640720fae48028cc8815fc0112cb7a794bf9f340 --- .changelog/1064.txt | 3 +++ pkg/envoy/proxy.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .changelog/1064.txt diff --git a/.changelog/1064.txt b/.changelog/1064.txt new file mode 100644 index 00000000..08d4a94b --- /dev/null +++ b/.changelog/1064.txt @@ -0,0 +1,3 @@ +```release-note:bug +- envoy: add `skip_exit` to `drain_listeners` admin API call to prevent premature pod termination when upgrading to Envoy 1.37+ +``` \ No newline at end of file diff --git a/pkg/envoy/proxy.go b/pkg/envoy/proxy.go index a9e08c0d..c2ad2ba9 100644 --- a/pkg/envoy/proxy.go +++ b/pkg/envoy/proxy.go @@ -179,7 +179,7 @@ func (p *Proxy) Run(ctx context.Context) error { // Note: the caller is responsible for ensuring Drain is not called concurrently // with Run, as this is thread-unsafe. func (p *Proxy) Drain() error { - envoyDrainListenersUrl := fmt.Sprintf("http://%s:%v/drain_listeners?inboundonly&graceful", p.cfg.AdminAddr, p.cfg.AdminBindPort) + envoyDrainListenersUrl := fmt.Sprintf("http://%s/drain_listeners?inboundonly&graceful&skip_exit", net.JoinHostPort(p.cfg.AdminAddr, strconv.Itoa(p.cfg.AdminBindPort))) switch p.getState() { case stateExited: // Nothing to do!