Skip to content

Commit

Permalink
fix missing required changes
Browse files Browse the repository at this point in the history
Signed-off-by: lemonlinger <lemonlinger@gmail.com>
  • Loading branch information
lemonlinger committed Nov 27, 2023
1 parent 14ae3ad commit 1fbb912
Show file tree
Hide file tree
Showing 2 changed files with 203 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ backendTrafficPolicies:
namespace: default
spec:
healthCheck:
timeout: "1s"
interval: "5s"
unhealthyThreshold: 3
healthyThreshold: 3
healthChecker:
type: GRPC
grpc:
serviceName: "service"
Authority: "foo"
authority: foo
metadata:
x-source: "gateway"
x-source: gateway
serviceName: service
type: GRPC
healthyThreshold: 3
interval: 5s
timeout: 1s
unhealthyThreshold: 3
targetRef:
group: gateway.networking.k8s.io
kind: HTTPRoute
Expand All @@ -38,19 +38,19 @@ backendTrafficPolicies:
namespace: default
spec:
healthCheck:
timeout: "1s"
interval: "5s"
unhealthyThreshold: 3
healthyThreshold: 3
healthChecker:
type: TCP
tcp:
receive:
- text: pong
type: Text
send:
text: ping
type: Text
text: "ping"
receive:
- type: Text
text: "pong"
type: TCP
healthyThreshold: 3
interval: 5s
timeout: 1s
unhealthyThreshold: 3
targetRef:
group: gateway.networking.k8s.io
kind: HTTPRoute
Expand All @@ -71,22 +71,22 @@ backendTrafficPolicies:
namespace: envoy-gateway
spec:
healthCheck:
timeout: "500ms"
interval: "3s"
unhealthyThreshold: 3
healthyThreshold: 1
healthChecker:
type: HTTP
http:
path: "/healthz"
expectedStatuses:
- start: 200
end: 300
- start: 300
end: 400
expectedResponses:
- type: Text
text: "ok"
- text: ok
type: Text
expectedStatuses:
- end: 300
start: 200
- end: 400
start: 300
path: /healthz
type: HTTP
healthyThreshold: 1
interval: 3s
timeout: 500ms
unhealthyThreshold: 3
targetRef:
group: gateway.networking.k8s.io
kind: Gateway
Expand Down Expand Up @@ -344,21 +344,21 @@ xdsIR:
port: 8080
protocol: GRPC
weight: 1
hostname: '*'
healthCheck:
timeout: "500ms"
interval: "3s"
unhealthyThreshold: 3
healthyThreshold: 1
http:
path: "/healthz"
expectedStatuses:
- start: 200
end: 300
- start: 300
end: 400
expectedResponses:
- text: "ok"
- text: ok
expectedStatuses:
- end: 300
start: 200
- end: 400
start: 300
path: /healthz
interval: 3s
timeout: 500ms
unhealthyThreshold: 3
hostname: '*'
name: grpcroute/default/grpcroute-1/rule/0/match/-1/*
envoy-gateway/gateway-2:
accessLog:
Expand All @@ -376,53 +376,53 @@ xdsIR:
invalid: 0
valid: 0
destination:
name: httproute/default/httproute-1/rule/0
name: httproute/default/httproute-2/rule/0
settings:
- endpoints:
- host: 7.7.7.7
port: 8080
protocol: HTTP
weight: 1
hostname: gateway.envoyproxy.io
healthCheck:
timeout: "1s"
interval: "5s"
unhealthyThreshold: 3
healthyThreshold: 3
grpc:
serviceName: "service"
Authority: "foo"
metadata:
x-source: "gateway"
name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io
interval: 5s
tcp:
receive:
- text: pong
send:
text: ping
timeout: 1s
unhealthyThreshold: 3
hostname: gateway.envoyproxy.io
name: httproute/default/httproute-2/rule/0/match/0/gateway_envoyproxy_io
pathMatch:
distinct: false
name: ""
prefix: /
prefix: /v2
- backendWeights:
invalid: 0
valid: 0
destination:
name: httproute/default/httproute-2/rule/0
name: httproute/default/httproute-1/rule/0
settings:
- endpoints:
- host: 7.7.7.7
port: 8080
protocol: HTTP
weight: 1
hostname: gateway.envoyproxy.io
healthCheck:
timeout: "1s"
interval: "5s"
unhealthyThreshold: 3
grpc:
authority: foo
metadata:
x-source: gateway
serviceName: service
healthyThreshold: 3
tcp:
send:
text: "ping"
receive:
- text: "pong"
name: httproute/default/httproute-2/rule/0/match/0/gateway_envoyproxy_io
interval: 5s
timeout: 1s
unhealthyThreshold: 3
hostname: gateway.envoyproxy.io
name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io
pathMatch:
distinct: false
name: ""
prefix: /v2
prefix: /
138 changes: 138 additions & 0 deletions site/content/en/latest/api/extension_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ _Appears in:_
| `loadBalancer` _[LoadBalancer](#loadbalancer)_ | LoadBalancer policy to apply when routing traffic from the gateway to the backend endpoints |
| `proxyProtocol` _[ProxyProtocol](#proxyprotocol)_ | ProxyProtocol enables the Proxy Protocol when communicating with the backend. |
| `tcpKeepalive` _[TCPKeepalive](#tcpkeepalive)_ | TcpKeepalive settings associated with the upstream client connection. Disabled by default. |
| `healthCheck` _[HealthCheck](#healthcheck)_ | HealthCheck allows gateway to perform active health checking on backends. |



Expand Down Expand Up @@ -787,6 +788,22 @@ _Appears in:_
| `path` _string_ | Path defines the file path used to expose envoy access log(e.g. /dev/stdout). |


#### GRPCHealthChecker



GRPCHealthChecker defines the settings of grpc health check.

_Appears in:_
- [HealthChecker](#healthchecker)

| Field | Description |
| --- | --- |
| `serviceName` _string_ | ServiceName defines the value of parameter service in the gRPC health check request. |
| `authority` _string_ | Authority defines the value of :authority header in the gRPC health check request. |
| `metadata` _object (keys:string, values:string)_ | Refer to Kubernetes API documentation for fields of `metadata`. |


#### Gateway


Expand Down Expand Up @@ -832,6 +849,23 @@ _Appears in:_
| `kind` _string_ | |


#### HTTPHealthChecker



HTTPHealthChecker defines the settings of http health check.

_Appears in:_
- [HealthChecker](#healthchecker)

| Field | Description |
| --- | --- |
| `path` _string_ | Path defines the HTTP path that will be requested during health checking. |
| `method` _string_ | Method defines the HTTP method used for health checking. |
| `expectedStatuses` _[Int64Range](#int64range) array_ | ExpectedStatuses defines a list of HTTP response statuses considered healthy. |
| `expectedResponses` _[HealthCheckPayload](#healthcheckpayload) array_ | ExpectedResponses defines a list of HTTP expected responses to match. |


#### HeaderMatch


Expand All @@ -843,6 +877,80 @@ _Appears in:_



#### HealthCheck



HealthCheck defines the health check configuration.

_Appears in:_
- [BackendTrafficPolicySpec](#backendtrafficpolicyspec)

| Field | Description |
| --- | --- |
| `timeout` _[Duration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#duration-v1-meta)_ | Timeout defines the time to wait for a health check response. |
| `interval` _[Duration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#duration-v1-meta)_ | Interval defines the time between health checks. |
| `unhealthyThreshold` _integer_ | UnhealthyThreshold defines the number of unhealthy health checks required before a backend host is marked unhealthy. |
| `healthyThreshold` _integer_ | HealthyThreshold defines the number of healthy health checks required before a backend host is marked healthy. |
| `healthChecker` _[HealthChecker](#healthchecker)_ | HealthChecker defines the concrete health checker to do health checking. |


#### HealthCheckPayload



HealthCheckPayload defines the encoding of the payload bytes in the payload.

_Appears in:_
- [HTTPHealthChecker](#httphealthchecker)
- [TCPHealthChecker](#tcphealthchecker)

| Field | Description |
| --- | --- |
| `type` _[HealthCheckPayloadType](#healthcheckpayloadtype)_ | Type defines the type of the payload. |
| `text` _string_ | Text payload |
| `binary` _integer array_ | Binary payload |


#### HealthCheckPayloadType

_Underlying type:_ `string`

HealthCheckPayloadType is the type of the payload.

_Appears in:_
- [HealthCheckPayload](#healthcheckpayload)



#### HealthChecker



HealthChecker defines the configuration of concrete health checker. EG supports various types of health checking including HTTP, GRPC, TCP.

_Appears in:_
- [HealthCheck](#healthcheck)

| Field | Description |
| --- | --- |
| `type` _[HealthCheckerType](#healthcheckertype)_ | Type defines the type of health checker. |
| `http` _[HTTPHealthChecker](#httphealthchecker)_ | HTTP defines the configuration of http health checker. It's required while the health checker type is HTTP. |
| `grpc` _[GRPCHealthChecker](#grpchealthchecker)_ | GRPC defines the configuration of grpc health checker. It's required while the health checker type is GRPC. |
| `tcp` _[TCPHealthChecker](#tcphealthchecker)_ | TCP defines the configuration of tcp health checker. It's required while the health checker type is TCP. |


#### HealthCheckerType

_Underlying type:_ `string`

HealthCheckerType is the type of health checker.

_Appears in:_
- [HealthChecker](#healthchecker)



#### InfrastructureProviderType

_Underlying type:_ `string`
Expand All @@ -854,6 +962,21 @@ _Appears in:_



#### Int64Range



Int64Range defines the int64 start and end of the range using half-open interval semantics [start, end).

_Appears in:_
- [HTTPHealthChecker](#httphealthchecker)

| Field | Description |
| --- | --- |
| `start` _integer_ | Start defines start of the range (inclusive) |
| `end` _integer_ | End defines end of the range (exclusive) |


#### JSONPatchOperation


Expand Down Expand Up @@ -1723,6 +1846,21 @@ _Appears in:_



#### TCPHealthChecker



TCPHealthChecker defines the settings of tcp health check.

_Appears in:_
- [HealthChecker](#healthchecker)

| Field | Description |
| --- | --- |
| `send` _[HealthCheckPayload](#healthcheckpayload)_ | Send defines the request payload. |
| `receive` _[HealthCheckPayload](#healthcheckpayload) array_ | Receive defines the expected response payloads. |


#### TCPKeepalive


Expand Down

0 comments on commit 1fbb912

Please sign in to comment.