Skip to content

Commit f2d4d6a

Browse files
committed
chore: update health check testdata
Signed-off-by: zirain <zirain2009@gmail.com>
1 parent cab6837 commit f2d4d6a

5 files changed

Lines changed: 730 additions & 1 deletion

File tree

internal/gatewayapi/testdata/backendtrafficpolicy-with-healthcheck.in.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,49 @@ httpRoutes:
169169
- group: gateway.envoyproxy.io
170170
kind: Backend
171171
name: backend-1
172+
- apiVersion: gateway.networking.k8s.io/v1
173+
kind: HTTPRoute
174+
metadata:
175+
namespace: default
176+
name: httproute-6
177+
spec:
178+
hostnames:
179+
- example.com
180+
parentRefs:
181+
- namespace: envoy-gateway
182+
name: gateway-2
183+
sectionName: http
184+
rules:
185+
- matches:
186+
- path:
187+
value: "/v6"
188+
backendRefs:
189+
- group: gateway.envoyproxy.io
190+
kind: Backend
191+
name: backend-2
192+
# Hostname rewrite filter applied, should use example2.com when doing health check.
193+
filters:
194+
- type: URLRewrite
195+
urlRewrite:
196+
hostname: example2.com
197+
- group: gateway.envoyproxy.io
198+
kind: Backend
199+
name: backend-3
200+
- matches:
201+
- path:
202+
value: "/v6-rewrite"
203+
# Hostname rewrite filter applied, should use example2.com when doing health check.
204+
filters:
205+
- type: URLRewrite
206+
urlRewrite:
207+
hostname: example2.com
208+
backendRefs:
209+
- group: gateway.envoyproxy.io
210+
kind: Backend
211+
name: backend-2
212+
- group: gateway.envoyproxy.io
213+
kind: Backend
214+
name: backend-3
172215
backends:
173216
- apiVersion: gateway.envoyproxy.io/v1alpha1
174217
kind: Backend
@@ -182,6 +225,28 @@ backends:
182225
address: 1.1.1.1
183226
port: 3001
184227
zone: zone1
228+
- apiVersion: gateway.envoyproxy.io/v1alpha1
229+
kind: Backend
230+
metadata:
231+
name: backend-2
232+
namespace: default
233+
spec:
234+
endpoints:
235+
- hostname: "example2.com"
236+
fqdn:
237+
hostname: "example2.com"
238+
port: 3001
239+
- apiVersion: gateway.envoyproxy.io/v1alpha1
240+
kind: Backend
241+
metadata:
242+
name: backend-3
243+
namespace: default
244+
spec:
245+
endpoints:
246+
- hostname: "example3.com"
247+
fqdn:
248+
hostname: "example3.com"
249+
port: 3001
185250
backendTrafficPolicies:
186251
- apiVersion: gateway.envoyproxy.io/v1alpha1
187252
kind: BackendTrafficPolicy
@@ -361,6 +426,29 @@ backendTrafficPolicies:
361426
healthyThreshold: 2
362427
type: TCP
363428
tcp: {}
429+
- apiVersion: gateway.envoyproxy.io/v1alpha1
430+
kind: BackendTrafficPolicy
431+
metadata:
432+
namespace: default
433+
name: policy-for-route-6
434+
spec:
435+
targetRefs:
436+
- group: gateway.networking.k8s.io
437+
kind: HTTPRoute
438+
name: httproute-6
439+
healthCheck:
440+
active:
441+
timeout: "10s"
442+
interval: "30s"
443+
initialJitter: "15s"
444+
unhealthyThreshold: 2
445+
healthyThreshold: 2
446+
type: HTTP
447+
http:
448+
method: GET
449+
path: /healthz
450+
expectedStatuses:
451+
- 200
364452
- apiVersion: gateway.envoyproxy.io/v1alpha1
365453
kind: BackendTrafficPolicy
366454
metadata:

0 commit comments

Comments
 (0)