Skip to content

Commit

Permalink
Update max_ejection_percent on outlier detection for peered clusters …
Browse files Browse the repository at this point in the history
…to 100%

We can't trust health checks on peered services when service resolvers,
splitters and routers are used.
  • Loading branch information
erichaberkorn committed Aug 29, 2022
1 parent e64a285 commit 43c2f4d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .changelog/14373.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
xds: Set `max_ejection_percent` on Envoy's outlier detection to 100% for peered services.
```
5 changes: 4 additions & 1 deletion agent/xds/clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,9 @@ func (s *ResourceGenerator) makeUpstreamClusterForPeerService(

clusterName := generatePeeredClusterName(uid, tbs)

outlierDetection := ToOutlierDetection(cfg.PassiveHealthCheck)
outlierDetection.MaxEjectionPercent = &wrappers.UInt32Value{Value: 100}

s.Logger.Trace("generating cluster for", "cluster", clusterName)
if c == nil {
c = &envoy_cluster_v3.Cluster{
Expand All @@ -785,7 +788,7 @@ func (s *ResourceGenerator) makeUpstreamClusterForPeerService(
CircuitBreakers: &envoy_cluster_v3.CircuitBreakers{
Thresholds: makeThresholdsIfNeeded(cfg.Limits),
},
OutlierDetection: ToOutlierDetection(cfg.PassiveHealthCheck),
OutlierDetection: outlierDetection,
}
if cfg.Protocol == "http2" || cfg.Protocol == "grpc" {
if err := s.setHttp2ProtocolOptions(c); err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"dnsRefreshRate": "10s",
"dnsLookupFamily": "V4_ONLY",
"outlierDetection": {

"maxEjectionPercent": 100
},
"commonLbConfig": {
"healthyPanicThreshold": {
Expand Down Expand Up @@ -115,7 +115,7 @@

},
"outlierDetection": {

"maxEjectionPercent": 100
},
"commonLbConfig": {
"healthyPanicThreshold": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

},
"outlierDetection": {

"maxEjectionPercent": 100
},
"commonLbConfig": {
"healthyPanicThreshold": {
Expand Down Expand Up @@ -75,7 +75,7 @@

},
"outlierDetection": {

"maxEjectionPercent": 100
},
"commonLbConfig": {
"healthyPanicThreshold": {
Expand Down Expand Up @@ -157,7 +157,7 @@

},
"outlierDetection": {

"maxEjectionPercent": 100
},
"commonLbConfig": {
"healthyPanicThreshold": {
Expand Down

0 comments on commit 43c2f4d

Please sign in to comment.