fix(envoy): add keep-alive time to detect sidecar disconnections
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
@@ -16,6 +16,7 @@ import (
xds_discovery "github.com/envoyproxy/go-control-plane/envoy/service/discovery/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"
@@ -278,6 +279,13 @@ func (b *Builder) Build() (*xds_bootstrap.Bootstrap, error) {
},
},
},
+ UpstreamConnectionOptions: &xds_cluster.UpstreamConnectionOptions{
+ TcpKeepalive: &xds_core.TcpKeepalive{
+ KeepaliveProbes: wrapperspb.UInt32(5),
+ KeepaliveTime: wrapperspb.UInt32(60),
+ KeepaliveInterval: wrapperspb.UInt32(5),
+ },
+ },
},
},
},
