From 8f6cf95417ded2c7e41a3b75c90e0ede36633e0a Mon Sep 17 00:00:00 2001 From: Sanya Kochhar <42152676+SanyaKochhar@users.noreply.github.com> Date: Wed, 5 Oct 2022 12:26:03 -0400 Subject: [PATCH] [backport] cherry-pick 988003b into release-v1.1 fix(envoy): add keep-alive time to detect sidecar disconnections (#5189) - Defines a 60s keep-alive time after which probes will start being sent to check if a sidecar is still connected to the control plane - Defines 5s interval and 5 probes after which connection will time out Signed-off-by: Sanya Kochhar Signed-off-by: Shalier Xia --- pkg/envoy/bootstrap/config.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/envoy/bootstrap/config.go b/pkg/envoy/bootstrap/config.go index 451840f55b..f58b517178 100644 --- a/pkg/envoy/bootstrap/config.go +++ b/pkg/envoy/bootstrap/config.go @@ -11,6 +11,7 @@ import ( xds_upstream_http "github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/http/v3" "github.com/golang/protobuf/ptypes/any" "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/protobuf/types/known/wrapperspb" "github.com/openservicemesh/osm/pkg/constants" "github.com/openservicemesh/osm/pkg/envoy" @@ -183,6 +184,13 @@ func BuildFromConfig(config Config) (*xds_bootstrap.Bootstrap, error) { }, }, }, + UpstreamConnectionOptions: &xds_cluster.UpstreamConnectionOptions{ + TcpKeepalive: &xds_core.TcpKeepalive{ + KeepaliveProbes: wrapperspb.UInt32(5), + KeepaliveTime: wrapperspb.UInt32(60), + KeepaliveInterval: wrapperspb.UInt32(5), + }, + }, }, }, },