Update max_ejection_percent on outlier detection for peered clusters to 100% (#14373)
We can't trust health checks on peered services when service resolvers, splitters and routers are used.
This commit is contained in:
parent
680ff580a3
commit
13992d5dc8
|
@ -0,0 +1,3 @@
|
||||||
|
```release-note:improvement
|
||||||
|
xds: Set `max_ejection_percent` on Envoy's outlier detection to 100% for peered services.
|
||||||
|
```
|
|
@ -772,6 +772,13 @@ func (s *ResourceGenerator) makeUpstreamClusterForPeerService(
|
||||||
|
|
||||||
clusterName := generatePeeredClusterName(uid, tbs)
|
clusterName := generatePeeredClusterName(uid, tbs)
|
||||||
|
|
||||||
|
outlierDetection := ToOutlierDetection(cfg.PassiveHealthCheck)
|
||||||
|
// We can't rely on health checks for services on cluster peers because they
|
||||||
|
// don't take into account service resolvers, splitters and routers. Setting
|
||||||
|
// MaxEjectionPercent too 100% gives outlier detection the power to eject the
|
||||||
|
// entire cluster.
|
||||||
|
outlierDetection.MaxEjectionPercent = &wrappers.UInt32Value{Value: 100}
|
||||||
|
|
||||||
s.Logger.Trace("generating cluster for", "cluster", clusterName)
|
s.Logger.Trace("generating cluster for", "cluster", clusterName)
|
||||||
if c == nil {
|
if c == nil {
|
||||||
c = &envoy_cluster_v3.Cluster{
|
c = &envoy_cluster_v3.Cluster{
|
||||||
|
@ -785,7 +792,7 @@ func (s *ResourceGenerator) makeUpstreamClusterForPeerService(
|
||||||
CircuitBreakers: &envoy_cluster_v3.CircuitBreakers{
|
CircuitBreakers: &envoy_cluster_v3.CircuitBreakers{
|
||||||
Thresholds: makeThresholdsIfNeeded(cfg.Limits),
|
Thresholds: makeThresholdsIfNeeded(cfg.Limits),
|
||||||
},
|
},
|
||||||
OutlierDetection: ToOutlierDetection(cfg.PassiveHealthCheck),
|
OutlierDetection: outlierDetection,
|
||||||
}
|
}
|
||||||
if cfg.Protocol == "http2" || cfg.Protocol == "grpc" {
|
if cfg.Protocol == "http2" || cfg.Protocol == "grpc" {
|
||||||
if err := s.setHttp2ProtocolOptions(c); err != nil {
|
if err := s.setHttp2ProtocolOptions(c); err != nil {
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
"dnsRefreshRate": "10s",
|
"dnsRefreshRate": "10s",
|
||||||
"dnsLookupFamily": "V4_ONLY",
|
"dnsLookupFamily": "V4_ONLY",
|
||||||
"outlierDetection": {
|
"outlierDetection": {
|
||||||
|
"maxEjectionPercent": 100
|
||||||
},
|
},
|
||||||
"commonLbConfig": {
|
"commonLbConfig": {
|
||||||
"healthyPanicThreshold": {
|
"healthyPanicThreshold": {
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
"outlierDetection": {
|
"outlierDetection": {
|
||||||
|
"maxEjectionPercent": 100
|
||||||
},
|
},
|
||||||
"commonLbConfig": {
|
"commonLbConfig": {
|
||||||
"healthyPanicThreshold": {
|
"healthyPanicThreshold": {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
"outlierDetection": {
|
"outlierDetection": {
|
||||||
|
"maxEjectionPercent": 100
|
||||||
},
|
},
|
||||||
"commonLbConfig": {
|
"commonLbConfig": {
|
||||||
"healthyPanicThreshold": {
|
"healthyPanicThreshold": {
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
"outlierDetection": {
|
"outlierDetection": {
|
||||||
|
"maxEjectionPercent": 100
|
||||||
},
|
},
|
||||||
"commonLbConfig": {
|
"commonLbConfig": {
|
||||||
"healthyPanicThreshold": {
|
"healthyPanicThreshold": {
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
"outlierDetection": {
|
"outlierDetection": {
|
||||||
|
"maxEjectionPercent": 100
|
||||||
},
|
},
|
||||||
"commonLbConfig": {
|
"commonLbConfig": {
|
||||||
"healthyPanicThreshold": {
|
"healthyPanicThreshold": {
|
||||||
|
|
Loading…
Reference in New Issue