Skip to content

Commit

Permalink
shutdown drainTimeout should also affect envoy drain time (envoyproxy…
Browse files Browse the repository at this point in the history
…#2898)

Signed-off-by: Arko Dasgupta <[email protected]>
  • Loading branch information
arkodg authored Mar 12, 2024
1 parent 87eb555 commit bb0a9a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/infrastructure/kubernetes/proxy/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ func expectedProxyContainers(infra *ir.ProxyInfra,
args = append(args, fmt.Sprintf("--component-log-level %s", componentsLogLevel))
}

if shutdownConfig != nil && shutdownConfig.DrainTimeout != nil {
args = append(args, fmt.Sprintf("--drain-time-s %.0f", shutdownConfig.DrainTimeout.Seconds()))
}

if infra.Config != nil {
args = append(args, infra.Config.Spec.ExtraArgs...)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ spec:
resource_api_version: V3
- --log-level warn
- --cpuset-threads
- --drain-time-s 30
command:
- envoy
env:
Expand Down

0 comments on commit bb0a9a7

Please sign in to comment.