Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
[backport] cherry-pick 988003b into release-v1.1
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Shalier Xia <[email protected]>
  • Loading branch information
SanyaKochhar authored and shalier committed Oct 18, 2022
1 parent 170b333 commit 8f6cf95
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/envoy/bootstrap/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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),
},
},
},
},
},
Expand Down

0 comments on commit 8f6cf95

Please sign in to comment.