Skip to content

Commit 988003b

Browse files
authored
fix(envoy): add keep-alive time to detect sidecar disconnections (openservicemesh#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]>
1 parent fef79ee commit 988003b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/envoy/bootstrap/config.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
xds_discovery "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
1717
"github.com/golang/protobuf/ptypes/any"
1818
"google.golang.org/protobuf/types/known/anypb"
19+
"google.golang.org/protobuf/types/known/wrapperspb"
1920

2021
"github.com/openservicemesh/osm/pkg/constants"
2122
"github.com/openservicemesh/osm/pkg/envoy"
@@ -278,6 +279,13 @@ func (b *Builder) Build() (*xds_bootstrap.Bootstrap, error) {
278279
},
279280
},
280281
},
282+
UpstreamConnectionOptions: &xds_cluster.UpstreamConnectionOptions{
283+
TcpKeepalive: &xds_core.TcpKeepalive{
284+
KeepaliveProbes: wrapperspb.UInt32(5),
285+
KeepaliveTime: wrapperspb.UInt32(60),
286+
KeepaliveInterval: wrapperspb.UInt32(5),
287+
},
288+
},
281289
},
282290
},
283291
},

0 commit comments

Comments
 (0)