Skip to content

Commit

Permalink
fix link and gen-check
Browse files Browse the repository at this point in the history
Signed-off-by: zhaonan <[email protected]>
  • Loading branch information
zhaonan committed Nov 9, 2023
1 parent 19a388d commit 01c7a9e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 54 deletions.
3 changes: 2 additions & 1 deletion api/v1alpha1/backendtrafficpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ type BackendTrafficPolicySpec struct {
// +optional
LoadBalancer *LoadBalancer `json:"loadBalancer,omitempty"`

// RetryStrategy allows the user to retry multiple times when a request fails.
// RetryStrategy allows the user to retry multiple times when a request fails
//
// +optional
RetryStrategy *RetryStrategy `json:"retryStrategy,omitempty"`
}
Expand Down
21 changes: 2 additions & 19 deletions api/v1alpha1/retrystragegy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,7 @@ const (
// HTTPRetry defines the retry triggering conditions for HTTP protocol.
type HTTPRetry struct {
// RetryOn indicates the retry policy. One or more policies can be specified using a ',' delimited list.
// The supported policies are:
// * 5xx: gateway will attempt a retry if the upstream server responds with any 5xx response code, or does not respond at all (disconnect/reset/read timeout).
// (Includes connect-failure and refused-stream)
// * gateway-error: gateway will attempt a retry when the response is a gateway error (502,503 or 504).
// * reset: gateway will attempt a retry if the upstream server does not respond at all (disconnect/reset/read timeout.)
// * connect-failure: gateway will attempt a retry if a request is failed because of a connection failure to the upstream
// server (connect timeout, etc.). (Included in *5xx*)
// * retriable-4xx: gateway will attempt a retry if the upstream server responds with a retriable 4xx response code.
// Currently, the only response code in this category is 409.
// * refused-stream: gateway will attempt a retry if the upstream server resets the stream with a REFUSED_STREAM error code.
// This reset type indicates that a request is safe to retry. (Included in 5xx)
// * retriable-status-codes: gateway will attempt a retry if the upstream server responds with any response code
// matching one defined in the RetriableStatusCodes.
// The supported policies are: 5xx,gateway-error,reset,connect-failure,retriable-4xx,refused-stream,retriable-status-codes
// For additional details, see https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-on
RetryOn RetryOn `json:"retryOn"`
// HTTP status codes that should trigger a retry in addition to those specified by retry_on, required when retry_on is set to retriable-status-codes.
Expand All @@ -80,12 +68,7 @@ type HTTPRetry struct {
// GrpcRetry defines the retry triggering conditions for GRPC protocol.
type GrpcRetry struct {
// GRPC retries are currently only supported for gRPC status codes in response headers. RetryOn indicates the retry policy. One or more policies can be specified using a ',' delimited list.
// The supported policies are:
// * cancelled: gateway will attempt a retry if the gRPC status code in the response headers is “cancelled”.
// * deadline-exceeded: gateway will attempt a retry if the gRPC status code in the response headers is “deadline-exceeded”.
// * internal: gateway will attempt a retry if the gRPC status code in the response headers is “internal”.
// * resource-exhausted: gateway will attempt a retry if the gRPC status code in the response headers is “resource-exhausted”.
// * unavailable: gateway will attempt a retry if the gRPC status code in the response headers is “unavailable”.
// The supported policies are: cancelled,deadline-exceeded,internal,resource-exhausted,unavailable
// For additional details, see https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-grpc-on
RetryOn RetryOn `json:"retryOn,omitempty"`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ spec:
type: object
retryStrategy:
description: RetryStrategy allows the user to retry multiple times
when a request fails.
when a request fails
properties:
grpc:
description: GrpcRetry defines the retry triggering conditions
Expand All @@ -232,17 +232,8 @@ spec:
gRPC status codes in response headers. RetryOn indicates
the retry policy. One or more policies can be specified
using a '','' delimited list. The supported policies are:
* cancelled: gateway will attempt a retry if the gRPC status
code in the response headers is “cancelled”. * deadline-exceeded:
gateway will attempt a retry if the gRPC status code in
the response headers is “deadline-exceeded”. * internal:
gateway will attempt a retry if the gRPC status code in
the response headers is “internal”. * resource-exhausted:
gateway will attempt a retry if the gRPC status code in
the response headers is “resource-exhausted”. * unavailable:
gateway will attempt a retry if the gRPC status code in
the response headers is “unavailable”. For additional details,
see https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-grpc-on'
cancelled,deadline-exceeded,internal,resource-exhausted,unavailable
For additional details, see https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-grpc-on'
type: string
type: object
http:
Expand All @@ -259,25 +250,7 @@ spec:
retryOn:
description: 'RetryOn indicates the retry policy. One or more
policies can be specified using a '','' delimited list.
The supported policies are: * 5xx: gateway will attempt
a retry if the upstream server responds with any 5xx response
code, or does not respond at all (disconnect/reset/read
timeout). (Includes connect-failure and refused-stream)
* gateway-error: gateway will attempt a retry when the response
is a gateway error (502,503 or 504). * reset: gateway will
attempt a retry if the upstream server does not respond
at all (disconnect/reset/read timeout.) * connect-failure: gateway
will attempt a retry if a request is failed because of a
connection failure to the upstream server (connect timeout,
etc.). (Included in *5xx*) * retriable-4xx: gateway will
attempt a retry if the upstream server responds with a retriable
4xx response code. Currently, the only response code in
this category is 409. * refused-stream: gateway will attempt
a retry if the upstream server resets the stream with a
REFUSED_STREAM error code. This reset type indicates that
a request is safe to retry. (Included in 5xx) * retriable-status-codes:
gateway will attempt a retry if the upstream server responds
with any response code matching one defined in the RetriableStatusCodes.
The supported policies are: 5xx,gateway-error,reset,connect-failure,retriable-4xx,refused-stream,retriable-status-codes
For additional details, see https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-on'
type: string
required:
Expand Down
6 changes: 3 additions & 3 deletions site/content/en/latest/api/extension_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ _Appears in:_
| `targetRef` _[PolicyTargetReferenceWithSectionName](#policytargetreferencewithsectionname)_ | targetRef is the name of the resource this policy is being attached to. This Policy and the TargetRef MUST be in the same namespace for this Policy to have effect and be applied to the Gateway. |
| `rateLimit` _[RateLimitSpec](#ratelimitspec)_ | RateLimit allows the user to limit the number of incoming requests to a predefined value based on attributes within the traffic flow. |
| `loadBalancer` _[LoadBalancer](#loadbalancer)_ | LoadBalancer policy to apply when routing traffic from the gateway to the backend endpoints |
| `retryStrategy` _[RetryStrategy](#retrystrategy)_ | RetryStrategy allows the user to retry multiple times when a request fails. |
| `retryStrategy` _[RetryStrategy](#retrystrategy)_ | RetryStrategy allows the user to retry multiple times when a request fails |



Expand Down Expand Up @@ -840,7 +840,7 @@ _Appears in:_

| Field | Description |
| --- | --- |
| `retryOn` _[RetryOn](#retryon)_ | GRPC retries are currently only supported for gRPC status codes in response headers. RetryOn indicates the retry policy. One or more policies can be specified using a ',' delimited list. The supported policies are: * cancelled: gateway will attempt a retry if the gRPC status code in the response headers is “cancelled”. * deadline-exceeded: gateway will attempt a retry if the gRPC status code in the response headers is “deadline-exceeded”. * internal: gateway will attempt a retry if the gRPC status code in the response headers is “internal”. * resource-exhausted: gateway will attempt a retry if the gRPC status code in the response headers is “resource-exhausted”. * unavailable: gateway will attempt a retry if the gRPC status code in the response headers is “unavailable”. For additional details, see https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-grpc-on |
| `retryOn` _[RetryOn](#retryon)_ | GRPC retries are currently only supported for gRPC status codes in response headers. RetryOn indicates the retry policy. One or more policies can be specified using a ',' delimited list. The supported policies are: cancelled,deadline-exceeded,internal,resource-exhausted,unavailable For additional details, see https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-grpc-on |


#### HTTPRetry
Expand All @@ -854,7 +854,7 @@ _Appears in:_

| Field | Description |
| --- | --- |
| `retryOn` _[RetryOn](#retryon)_ | RetryOn indicates the retry policy. One or more policies can be specified using a ',' delimited list. The supported policies are: * 5xx: gateway will attempt a retry if the upstream server responds with any 5xx response code, or does not respond at all (disconnect/reset/read timeout). (Includes connect-failure and refused-stream) * gateway-error: gateway will attempt a retry when the response is a gateway error (502,503 or 504). * reset: gateway will attempt a retry if the upstream server does not respond at all (disconnect/reset/read timeout.) * connect-failure: gateway will attempt a retry if a request is failed because of a connection failure to the upstream server (connect timeout, etc.). (Included in *5xx*) * retriable-4xx: gateway will attempt a retry if the upstream server responds with a retriable 4xx response code. Currently, the only response code in this category is 409. * refused-stream: gateway will attempt a retry if the upstream server resets the stream with a REFUSED_STREAM error code. This reset type indicates that a request is safe to retry. (Included in 5xx) * retriable-status-codes: gateway will attempt a retry if the upstream server responds with any response code matching one defined in the RetriableStatusCodes. For additional details, see https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-on |
| `retryOn` _[RetryOn](#retryon)_ | RetryOn indicates the retry policy. One or more policies can be specified using a ',' delimited list. The supported policies are: 5xx,gateway-error,reset,connect-failure,retriable-4xx,refused-stream,retriable-status-codes For additional details, see https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-on |
| `retriableStatusCodes` _integer array_ | HTTP status codes that should trigger a retry in addition to those specified by retry_on, required when retry_on is set to retriable-status-codes. |


Expand Down

0 comments on commit 01c7a9e

Please sign in to comment.