From 42d1cebfc26d243646fbf2938f3ed4b26eea21fb Mon Sep 17 00:00:00 2001 From: yangyang Date: Wed, 18 Oct 2023 17:26:16 +0800 Subject: [PATCH] add global outlier detection Signed-off-by: yangyang --- internal/dag/httpproxy_processor.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/dag/httpproxy_processor.go b/internal/dag/httpproxy_processor.go index af4208c59f8..df6a70389a8 100644 --- a/internal/dag/httpproxy_processor.go +++ b/internal/dag/httpproxy_processor.go @@ -112,6 +112,9 @@ type HTTPProxyProcessor struct { // configurable and off by default in order to support the feature // without requiring all existing test cases to change. SetSourceMetadataOnRoutes bool + + // GlobalOutlierDetection defines route-service's Global Outlier Detection configuration. + GlobalOutlierDetection *contour_api_v1.OutlierDetection } // Run translates HTTPProxies into DAG objects and @@ -981,7 +984,7 @@ func (p *HTTPProxyProcessor) computeRoutes( return nil } - outlierDetection, err := outlierDetectionPolicy(service.OutlierDetection) + outlierDetection, err := outlierDetectionPolicy(p.GlobalOutlierDetection, service.OutlierDetection) if err != nil { validCond.AddErrorf(contour_api_v1.ConditionTypeOutlierDetectionError, "OutlierDetectionInvalid", "%s on outlier detection", err)