Default Envoy Proxy drainTimeout to 240s, matching NGINX

What does this MR do?

Sets the Envoy Proxy connection drain timeout to 240s by default, matching the bundled NGINX Ingress.

When an Envoy Proxy pod stops (rollout, node drain, autoscaler consolidation), Envoy Gateway drains in-flight connections for 60s by default before closing them. The bundled NGINX Ingress allowed 240s for the same thing through its default worker-shutdown-timeout, together with the /wait-shutdown preStop hook and terminationGracePeriodSeconds: 300. So moving from NGINX to Gateway API cut the time long-running requests, such as large Git clones and pushes, get to finish.

NGINX Ingress (previous default) Envoy Gateway before this MR Envoy Gateway after this MR
Longest time in-flight connections get to finish worker-shutdown-timeout 240s drainTimeout 60s drainTimeout 240s
Pod terminationGracePeriodSeconds 300 360 (Envoy Gateway sets it to drainTimeout + 300s) 540

Changes:

  • values.yaml: gatewayApiResources.envoy.proxySpec.shutdown.drainTimeout: 240s. Helm deep-merges proxySpec, so existing user overrides of other proxySpec keys keep this default. Setting shutdown.drainTimeout overrides it.
  • Docs: new "Connection draining on shutdown" section in the Envoy Gateway migration guide, next to the existing NGINX → Gateway API timeout mapping.
  • Specs: the default and a merged override.

Envoy's shutdown manager exits as soon as the connection count drops to zero (after minDrainDuration, 10s by default). The longer limit applies while any downstream connection is open. That includes idle HTTP/1.1 keep-alive connections, which Envoy does not close when draining (NGINX does). So on busy instances, each Envoy Proxy pod takes about 240s instead of about 60s to stop during rollouts and node drains. Measured in the E2E validation, which also covers a possible follow-up.

Not changed on purpose: healthCheckFailureDelay and minDrainDuration. These keep the proxy serving while an external load balancer (for example an AWS NLB) removes the pod from its targets. NGINX had no equivalent enabled by default (--shutdown-grace-period is 0), and the right values depend on the load balancer. The docs point to them.

Sources

Versions match what the chart bundles: ingress-nginx controller v1.15.1 and Envoy Gateway v1.10.0 (gateway-helm in Chart.yaml). The Envoy Gateway shutdown defaults and code are unchanged from v1.9.3.

NGINX Ingress:

Envoy Gateway:

Raised on https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/instrumentor/-/merge_requests/9331#note_4259937772, where GitLab Dedicated set drainTimeout: 300s, healthCheckFailureDelay: 30s and minDrainDuration: 30s after seeing connection resets on long Git transfers during node drains.

Author checklist

For general guidance, please follow our Contributing guide.

Required

For anything in this list which will not be completed, please provide a reason in the MR discussion.

  • Merge Request Title and Description are up to date, accurate, and descriptive.
  • MR targeting the appropriate branch.
  • MR has a green pipeline.
  • Documentation created/updated.
  • Tests added/updated.
  • Have you validated that your change works end-to-end on a real cluster deployment?
  • Equivalent MR/issue for omnibus-gitlab opened. Not applicable: Omnibus does not use Envoy Gateway.
  • When ready for review, MR is marked as ready (not a draft) and assigned to a reviewer.

Reviewers checklist

🤖 Generated with Claude Code

Edited by João Alexandre Cunha

Merge request reports

Loading
Loading