Skip to content

Commit

Permalink
chore: add testdata to passive health checks (envoyproxy#2788)
Browse files Browse the repository at this point in the history
* chore: add testdata to passive health checks

Signed-off-by: yeedove <yeedove@gmail.com>

* fix test

Signed-off-by: yeedove <yeedove@gmail.com>

---------

Signed-off-by: yeedove <yeedove@gmail.com>
  • Loading branch information
deszhou authored Mar 5, 2024
1 parent 8817d4e commit 930dcc1
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ backendTrafficPolicies:
baseEjectionTime: 160s
interval: 2s
maxEjectionPercent: 100
consecutive5XxErrors: 5
consecutiveGatewayErrors: 0
consecutiveLocalOriginFailures: 5
splitExternalLocalOriginErrors: false
- apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
metadata:
Expand Down Expand Up @@ -163,6 +167,10 @@ backendTrafficPolicies:
baseEjectionTime: 150s
interval: 1s
maxEjectionPercent: 100
consecutive5XxErrors: 5
consecutiveGatewayErrors: 0
consecutiveLocalOriginFailures: 5
splitExternalLocalOriginErrors: false
- apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
metadata:
Expand All @@ -189,9 +197,13 @@ backendTrafficPolicies:
type: Text
text: pong
passive:
baseEjectionTime: 180s
interval: 1s
maxEjectionPercent: 100
baseEjectionTime: 10s
interval: 10s
maxEjectionPercent: 10
consecutive5XxErrors: 5
consecutiveGatewayErrors: 0
consecutiveLocalOriginFailures: 5
splitExternalLocalOriginErrors: false
- apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
metadata:
Expand Down Expand Up @@ -221,3 +233,7 @@ backendTrafficPolicies:
baseEjectionTime: 160s
interval: 8ms
maxEjectionPercent: 11
consecutive5XxErrors: 5
consecutiveGatewayErrors: 0
consecutiveLocalOriginFailures: 5
splitExternalLocalOriginErrors: false
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ backendTrafficPolicies:
unhealthyThreshold: 3
passive:
baseEjectionTime: 2m30s
consecutive5XxErrors: 5
consecutiveGatewayErrors: 0
consecutiveLocalOriginFailures: 5
interval: 1s
maxEjectionPercent: 100
splitExternalLocalOriginErrors: false
targetRef:
group: gateway.networking.k8s.io
kind: HTTPRoute
Expand Down Expand Up @@ -60,9 +64,13 @@ backendTrafficPolicies:
type: TCP
unhealthyThreshold: 3
passive:
baseEjectionTime: 3m0s
interval: 1s
maxEjectionPercent: 100
baseEjectionTime: 10s
consecutive5XxErrors: 5
consecutiveGatewayErrors: 0
consecutiveLocalOriginFailures: 5
interval: 10s
maxEjectionPercent: 10
splitExternalLocalOriginErrors: false
targetRef:
group: gateway.networking.k8s.io
kind: HTTPRoute
Expand Down Expand Up @@ -98,8 +106,12 @@ backendTrafficPolicies:
unhealthyThreshold: 3
passive:
baseEjectionTime: 2m40s
consecutive5XxErrors: 5
consecutiveGatewayErrors: 0
consecutiveLocalOriginFailures: 5
interval: 8ms
maxEjectionPercent: 11
splitExternalLocalOriginErrors: false
targetRef:
group: gateway.networking.k8s.io
kind: HTTPRoute
Expand Down Expand Up @@ -137,8 +149,12 @@ backendTrafficPolicies:
unhealthyThreshold: 3
passive:
baseEjectionTime: 2m40s
consecutive5XxErrors: 5
consecutiveGatewayErrors: 0
consecutiveLocalOriginFailures: 5
interval: 2s
maxEjectionPercent: 100
splitExternalLocalOriginErrors: false
targetRef:
group: gateway.networking.k8s.io
kind: Gateway
Expand Down Expand Up @@ -456,8 +472,12 @@ xdsIR:
unhealthyThreshold: 3
passive:
baseEjectionTime: 2m40s
consecutive5XxErrors: 5
consecutiveGatewayErrors: 0
consecutiveLocalOriginFailures: 5
interval: 2s
maxEjectionPercent: 100
splitExternalLocalOriginErrors: false
hostname: '*'
isHTTP2: true
name: grpcroute/default/grpcroute-1/rule/0/match/-1/*
Expand Down Expand Up @@ -500,9 +520,13 @@ xdsIR:
timeout: 1s
unhealthyThreshold: 3
passive:
baseEjectionTime: 3m0s
interval: 1s
maxEjectionPercent: 100
baseEjectionTime: 10s
consecutive5XxErrors: 5
consecutiveGatewayErrors: 0
consecutiveLocalOriginFailures: 5
interval: 10s
maxEjectionPercent: 10
splitExternalLocalOriginErrors: false
hostname: gateway.envoyproxy.io
isHTTP2: false
name: httproute/default/httproute-2/rule/0/match/0/gateway_envoyproxy_io
Expand Down Expand Up @@ -535,8 +559,12 @@ xdsIR:
unhealthyThreshold: 3
passive:
baseEjectionTime: 2m40s
consecutive5XxErrors: 5
consecutiveGatewayErrors: 0
consecutiveLocalOriginFailures: 5
interval: 8ms
maxEjectionPercent: 11
splitExternalLocalOriginErrors: false
hostname: gateway.envoyproxy.io
isHTTP2: false
name: httproute/default/httproute-3/rule/0/match/0/gateway_envoyproxy_io
Expand Down Expand Up @@ -572,8 +600,12 @@ xdsIR:
unhealthyThreshold: 3
passive:
baseEjectionTime: 2m30s
consecutive5XxErrors: 5
consecutiveGatewayErrors: 0
consecutiveLocalOriginFailures: 5
interval: 1s
maxEjectionPercent: 100
splitExternalLocalOriginErrors: false
hostname: gateway.envoyproxy.io
isHTTP2: false
name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io
Expand Down
16 changes: 16 additions & 0 deletions internal/xds/translator/testdata/in/xds-ir/health-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ http:
baseEjectionTime: 180s
interval: 2s
maxEjectionPercent: 100
consecutive5XxErrors: 5
consecutiveGatewayErrors: 0
consecutiveLocalOriginFailures: 5
splitExternalLocalOriginErrors: false
destination:
name: "first-route-dest"
settings:
Expand All @@ -52,6 +56,10 @@ http:
baseEjectionTime: 180s
interval: 1s
maxEjectionPercent: 100
consecutive5XxErrors: 5
consecutiveGatewayErrors: 0
consecutiveLocalOriginFailures: 5
splitExternalLocalOriginErrors: false
destination:
name: "second-route-dest"
settings:
Expand All @@ -75,6 +83,10 @@ http:
baseEjectionTime: 160s
interval: 1s
maxEjectionPercent: 100
consecutive5XxErrors: 5
consecutiveGatewayErrors: 0
consecutiveLocalOriginFailures: 5
splitExternalLocalOriginErrors: false
destination:
name: "third-route-dest"
settings:
Expand All @@ -98,6 +110,10 @@ http:
baseEjectionTime: 180s
interval: 1s
maxEjectionPercent: 90
consecutive5XxErrors: 5
consecutiveGatewayErrors: 0
consecutiveLocalOriginFailures: 5
splitExternalLocalOriginErrors: true
destination:
name: "fourth-route-dest"
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
name: first-route-dest
outlierDetection:
baseEjectionTime: 180s
consecutive5xx: 5
consecutiveGatewayFailure: 0
consecutiveLocalOriginFailure: 5
interval: 2s
maxEjectionPercent: 100
perConnectionBufferLimitBytes: 32768
Expand Down Expand Up @@ -60,6 +63,9 @@
name: second-route-dest
outlierDetection:
baseEjectionTime: 180s
consecutive5xx: 5
consecutiveGatewayFailure: 0
consecutiveLocalOriginFailure: 5
interval: 1s
maxEjectionPercent: 100
perConnectionBufferLimitBytes: 32768
Expand Down Expand Up @@ -90,6 +96,9 @@
name: third-route-dest
outlierDetection:
baseEjectionTime: 160s
consecutive5xx: 5
consecutiveGatewayFailure: 0
consecutiveLocalOriginFailure: 5
interval: 1s
maxEjectionPercent: 100
perConnectionBufferLimitBytes: 32768
Expand Down Expand Up @@ -120,7 +129,11 @@
name: fourth-route-dest
outlierDetection:
baseEjectionTime: 180s
consecutive5xx: 5
consecutiveGatewayFailure: 0
consecutiveLocalOriginFailure: 5
interval: 1s
maxEjectionPercent: 90
splitExternalLocalOriginErrors: true
perConnectionBufferLimitBytes: 32768
type: EDS

0 comments on commit 930dcc1

Please sign in to comment.