diff --git a/apis/applyconfiguration/apis/v1/httprouteretry.go b/apis/applyconfiguration/apis/v1/httprouteretry.go new file mode 100644 index 0000000000..dc55873c61 --- /dev/null +++ b/apis/applyconfiguration/apis/v1/httprouteretry.go @@ -0,0 +1,63 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "sigs.k8s.io/gateway-api/apis/v1" +) + +// HTTPRouteRetryApplyConfiguration represents an declarative configuration of the HTTPRouteRetry type for use +// with apply. +type HTTPRouteRetryApplyConfiguration struct { + Codes []v1.HTTPRouteRetryStatusCode `json:"codes,omitempty"` + Attempts *int `json:"attempts,omitempty"` + Backoff *v1.Duration `json:"backoff,omitempty"` +} + +// HTTPRouteRetryApplyConfiguration constructs an declarative configuration of the HTTPRouteRetry type for use with +// apply. +func HTTPRouteRetry() *HTTPRouteRetryApplyConfiguration { + return &HTTPRouteRetryApplyConfiguration{} +} + +// WithCodes adds the given value to the Codes field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Codes field. +func (b *HTTPRouteRetryApplyConfiguration) WithCodes(values ...v1.HTTPRouteRetryStatusCode) *HTTPRouteRetryApplyConfiguration { + for i := range values { + b.Codes = append(b.Codes, values[i]) + } + return b +} + +// WithAttempts sets the Attempts field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Attempts field is set to the value of the last call. +func (b *HTTPRouteRetryApplyConfiguration) WithAttempts(value int) *HTTPRouteRetryApplyConfiguration { + b.Attempts = &value + return b +} + +// WithBackoff sets the Backoff field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Backoff field is set to the value of the last call. +func (b *HTTPRouteRetryApplyConfiguration) WithBackoff(value v1.Duration) *HTTPRouteRetryApplyConfiguration { + b.Backoff = &value + return b +} diff --git a/apis/applyconfiguration/apis/v1/httprouterule.go b/apis/applyconfiguration/apis/v1/httprouterule.go index 7e9f4d8239..16158ec35e 100644 --- a/apis/applyconfiguration/apis/v1/httprouterule.go +++ b/apis/applyconfiguration/apis/v1/httprouterule.go @@ -30,6 +30,7 @@ type HTTPRouteRuleApplyConfiguration struct { Filters []HTTPRouteFilterApplyConfiguration `json:"filters,omitempty"` BackendRefs []HTTPBackendRefApplyConfiguration `json:"backendRefs,omitempty"` Timeouts *HTTPRouteTimeoutsApplyConfiguration `json:"timeouts,omitempty"` + Retry *HTTPRouteRetryApplyConfiguration `json:"retry,omitempty"` SessionPersistence *SessionPersistenceApplyConfiguration `json:"sessionPersistence,omitempty"` } @@ -94,6 +95,14 @@ func (b *HTTPRouteRuleApplyConfiguration) WithTimeouts(value *HTTPRouteTimeoutsA return b } +// WithRetry sets the Retry field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Retry field is set to the value of the last call. +func (b *HTTPRouteRuleApplyConfiguration) WithRetry(value *HTTPRouteRetryApplyConfiguration) *HTTPRouteRuleApplyConfiguration { + b.Retry = value + return b +} + // WithSessionPersistence sets the SessionPersistence field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the SessionPersistence field is set to the value of the last call. diff --git a/apis/applyconfiguration/internal/internal.go b/apis/applyconfiguration/internal/internal.go index cf2182195b..e841899762 100644 --- a/apis/applyconfiguration/internal/internal.go +++ b/apis/applyconfiguration/internal/internal.go @@ -861,6 +861,21 @@ var schemaYAML = typed.YAMLObject(`types: elementRelationship: associative keys: - name +- name: io.k8s.sigs.gateway-api.apis.v1.HTTPRouteRetry + map: + fields: + - name: attempts + type: + scalar: numeric + - name: backoff + type: + scalar: string + - name: codes + type: + list: + elementType: + scalar: numeric + elementRelationship: atomic - name: io.k8s.sigs.gateway-api.apis.v1.HTTPRouteRule map: fields: @@ -885,6 +900,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + - name: retry + type: + namedType: io.k8s.sigs.gateway-api.apis.v1.HTTPRouteRetry - name: sessionPersistence type: namedType: io.k8s.sigs.gateway-api.apis.v1.SessionPersistence diff --git a/apis/applyconfiguration/utils.go b/apis/applyconfiguration/utils.go index c88ae790dd..4e8686a3b2 100644 --- a/apis/applyconfiguration/utils.go +++ b/apis/applyconfiguration/utils.go @@ -111,6 +111,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &apisv1.HTTPRouteFilterApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("HTTPRouteMatch"): return &apisv1.HTTPRouteMatchApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("HTTPRouteRetry"): + return &apisv1.HTTPRouteRetryApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("HTTPRouteRule"): return &apisv1.HTTPRouteRuleApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("HTTPRouteSpec"): diff --git a/apis/v1/httproute_types.go b/apis/v1/httproute_types.go index dbae1fd864..3322c68eac 100644 --- a/apis/v1/httproute_types.go +++ b/apis/v1/httproute_types.go @@ -296,6 +296,14 @@ type HTTPRouteRule struct { // +optional Timeouts *HTTPRouteTimeouts `json:"timeouts,omitempty"` + // Retry defines the configuration for when to retry an HTTP request. + // + // Support: Extended + // + // +optional + // + Retry *HTTPRouteRetry `json:"retry,omitempty"` + // SessionPersistence defines and configures session persistence // for the route rule. // @@ -361,6 +369,95 @@ type HTTPRouteTimeouts struct { BackendRequest *Duration `json:"backendRequest,omitempty"` } +// HTTPRouteRetry defines retry configuration for an HTTPRoute. +// +// Implementations SHOULD retry on connection errors (disconnect, reset, timeout, +// TCP failure) if a retry stanza is configured. +type HTTPRouteRetry struct { + // Codes defines the HTTP response status codes for which a backend request + // should be retried. + // + // Support: Extended + // + // +optional + Codes []HTTPRouteRetryStatusCode `json:"codes,omitempty"` + + // Attempts specifies the maxmimum number of times an individual request + // from the gateway to a backend should be retried. + // + // If the maximum number of retries has been attempted without a successful + // response from the backend, the Gateway MUST return an error. + // + // When this field is unspecified, the number of times to attempt to retry + // a backend request is implementation-specific. + // + // Support: Extended + // + // +optional + Attempts *int `json:"attempts,omitempty"` + + // Backoff specifies the minimum duration a Gateway should wait between + // retry attempts and is represented in Gateway API Duration formatting. + // + // For example, setting the `rules[].retry.backoff` field to the value + // `100ms` will cause a backend request to first be retried approximately + // 100 milliseconds after timing out or receiving a response code configured + // to be retryable. + // + // An implementation MAY use an exponential or alternative backoff strategy + // for subsequent retry attempts, MAY cap the maximum backoff duration to + // some amount greater than the specified minimum, and MAY add arbitrary + // jitter to stagger requests, as long as unsuccessful backend requests are + // not retried before the configured minimum duration. + // + // If a Request timeout (`rules[].timeouts.request`) is configured on the + // route, the entire duration of the initial request and any retry attempts + // MUST not exceed the Request timeout duration. If any retry attempts are + // still in progress when the Request timeout duration has been reached, + // these SHOULD be canceled if possible and the Gateway MUST immediately + // return a timeout error. + // + // If a BackendRequest timeout (`rules[].timeouts.backendRequest`) is + // configured on the route, any retry attempts which reach the configured + // BackendRequest timeout duration without a response SHOULD be canceled if + // possible and the Gateway should wait for at least the specified backoff + // duration before attempting to retry the backend request again. + // + // If a BackendRequest timeout is _not_ configured on the route, retry + // attempts MAY time out after an implementation default duration, or MAY + // remain pending until a configured Request timeout or implementation + // default duration for total request time is reached. + // + // When this field is unspecified, the time to wait between retry attempts + // is implementation-specific. + // + // Support: Extended + // + // +optional + Backoff *Duration `json:"backoff,omitempty"` +} + +// HTTPRouteRetryStatusCode defines an HTTP response status code for +// which a backend request should be retried. +// +// Implementations MUST support the following status codes as retryable: +// +// * 500 +// * 502 +// * 503 +// * 504 +// +// Implementations MAY support specifying additional discrete values in the +// 500-599 range. +// +// Implementations MAY support specifying discrete values in the 400-499 range, +// which are often inadvisable to retry. +// +// +kubebuilder:validation:Minimum:=400 +// +kubebuilder:validation:Maximum:=599 +// +type HTTPRouteRetryStatusCode int + // PathMatchType specifies the semantics of how HTTP paths should be compared. // Valid PathMatchType values, along with their support levels, are: // diff --git a/apis/v1/zz_generated.deepcopy.go b/apis/v1/zz_generated.deepcopy.go index 6ce1393c4d..9679db12a8 100644 --- a/apis/v1/zz_generated.deepcopy.go +++ b/apis/v1/zz_generated.deepcopy.go @@ -1196,6 +1196,36 @@ func (in *HTTPRouteMatch) DeepCopy() *HTTPRouteMatch { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HTTPRouteRetry) DeepCopyInto(out *HTTPRouteRetry) { + *out = *in + if in.Codes != nil { + in, out := &in.Codes, &out.Codes + *out = make([]HTTPRouteRetryStatusCode, len(*in)) + copy(*out, *in) + } + if in.Attempts != nil { + in, out := &in.Attempts, &out.Attempts + *out = new(int) + **out = **in + } + if in.Backoff != nil { + in, out := &in.Backoff, &out.Backoff + *out = new(Duration) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRouteRetry. +func (in *HTTPRouteRetry) DeepCopy() *HTTPRouteRetry { + if in == nil { + return nil + } + out := new(HTTPRouteRetry) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HTTPRouteRule) DeepCopyInto(out *HTTPRouteRule) { *out = *in @@ -1230,6 +1260,11 @@ func (in *HTTPRouteRule) DeepCopyInto(out *HTTPRouteRule) { *out = new(HTTPRouteTimeouts) (*in).DeepCopyInto(*out) } + if in.Retry != nil { + in, out := &in.Retry, &out.Retry + *out = new(HTTPRouteRetry) + (*in).DeepCopyInto(*out) + } if in.SessionPersistence != nil { in, out := &in.SessionPersistence, &out.SessionPersistence *out = new(SessionPersistence) diff --git a/config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml b/config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml index 797bcf2b4a..e72d02c694 100644 --- a/config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml +++ b/config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml @@ -2823,6 +2823,114 @@ spec: minLength: 1 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ type: string + retry: + description: |+ + Retry defines the configuration for when to retry an HTTP request. + + + Support: Extended + + + properties: + attempts: + description: |- + Attempts specifies the maxmimum number of times an individual request + from the gateway to a backend should be retried. + + + If the maximum number of retries has been attempted without a successful + response from the backend, the Gateway MUST return an error. + + + When this field is unspecified, the number of times to attempt to retry + a backend request is implementation-specific. + + + Support: Extended + type: integer + backoff: + description: |- + Backoff specifies the minimum duration a Gateway should wait between + retry attempts and is represented in Gateway API Duration formatting. + + + For example, setting the `rules[].retry.backoff` field to the value + `100ms` will cause a backend request to first be retried approximately + 100 milliseconds after timing out or receiving a response code configured + to be retryable. + + + An implementation MAY use an exponential or alternative backoff strategy + for subsequent retry attempts, MAY cap the maximum backoff duration to + some amount greater than the specified minimum, and MAY add arbitrary + jitter to stagger requests, as long as unsuccessful backend requests are + not retried before the configured minimum duration. + + + If a Request timeout (`rules[].timeouts.request`) is configured on the + route, the entire duration of the initial request and any retry attempts + MUST not exceed the Request timeout duration. If any retry attempts are + still in progress when the Request timeout duration has been reached, + these SHOULD be canceled if possible and the Gateway MUST immediately + return a timeout error. + + + If a BackendRequest timeout (`rules[].timeouts.backendRequest`) is + configured on the route, any retry attempts which reach the configured + BackendRequest timeout duration without a response SHOULD be canceled if + possible and the Gateway should wait for at least the specified backoff + duration before attempting to retry the backend request again. + + + If a BackendRequest timeout is _not_ configured on the route, retry + attempts MAY time out after an implementation default duration, or MAY + remain pending until a configured Request timeout or implementation + default duration for total request time is reached. + + + When this field is unspecified, the time to wait between retry attempts + is implementation-specific. + + + Support: Extended + pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$ + type: string + codes: + description: |- + Codes defines the HTTP response status codes for which a backend request + should be retried. + + + Support: Extended + items: + description: |- + HTTPRouteRetryStatusCode defines an HTTP response status code for + which a backend request should be retried. + + + Implementations MUST support the following status codes as retryable: + + + * 500 + * 502 + * 503 + * 504 + + + Implementations MAY support specifying additional discrete values in the + 500-599 range. + + + Implementations MAY support specifying discrete values in the 400-499 range, + which are often inadvisable to retry. + + + + maximum: 599 + minimum: 400 + type: integer + type: array + type: object sessionPersistence: description: |+ SessionPersistence defines and configures session persistence @@ -6182,6 +6290,114 @@ spec: minLength: 1 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ type: string + retry: + description: |+ + Retry defines the configuration for when to retry an HTTP request. + + + Support: Extended + + + properties: + attempts: + description: |- + Attempts specifies the maxmimum number of times an individual request + from the gateway to a backend should be retried. + + + If the maximum number of retries has been attempted without a successful + response from the backend, the Gateway MUST return an error. + + + When this field is unspecified, the number of times to attempt to retry + a backend request is implementation-specific. + + + Support: Extended + type: integer + backoff: + description: |- + Backoff specifies the minimum duration a Gateway should wait between + retry attempts and is represented in Gateway API Duration formatting. + + + For example, setting the `rules[].retry.backoff` field to the value + `100ms` will cause a backend request to first be retried approximately + 100 milliseconds after timing out or receiving a response code configured + to be retryable. + + + An implementation MAY use an exponential or alternative backoff strategy + for subsequent retry attempts, MAY cap the maximum backoff duration to + some amount greater than the specified minimum, and MAY add arbitrary + jitter to stagger requests, as long as unsuccessful backend requests are + not retried before the configured minimum duration. + + + If a Request timeout (`rules[].timeouts.request`) is configured on the + route, the entire duration of the initial request and any retry attempts + MUST not exceed the Request timeout duration. If any retry attempts are + still in progress when the Request timeout duration has been reached, + these SHOULD be canceled if possible and the Gateway MUST immediately + return a timeout error. + + + If a BackendRequest timeout (`rules[].timeouts.backendRequest`) is + configured on the route, any retry attempts which reach the configured + BackendRequest timeout duration without a response SHOULD be canceled if + possible and the Gateway should wait for at least the specified backoff + duration before attempting to retry the backend request again. + + + If a BackendRequest timeout is _not_ configured on the route, retry + attempts MAY time out after an implementation default duration, or MAY + remain pending until a configured Request timeout or implementation + default duration for total request time is reached. + + + When this field is unspecified, the time to wait between retry attempts + is implementation-specific. + + + Support: Extended + pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$ + type: string + codes: + description: |- + Codes defines the HTTP response status codes for which a backend request + should be retried. + + + Support: Extended + items: + description: |- + HTTPRouteRetryStatusCode defines an HTTP response status code for + which a backend request should be retried. + + + Implementations MUST support the following status codes as retryable: + + + * 500 + * 502 + * 503 + * 504 + + + Implementations MAY support specifying additional discrete values in the + 500-599 range. + + + Implementations MAY support specifying discrete values in the 400-499 range, + which are often inadvisable to retry. + + + + maximum: 599 + minimum: 400 + type: integer + type: array + type: object sessionPersistence: description: |+ SessionPersistence defines and configures session persistence diff --git a/geps/gep-1731/index.md b/geps/gep-1731/index.md index 6085ab2483..f7785e13d5 100644 --- a/geps/gep-1731/index.md +++ b/geps/gep-1731/index.md @@ -1,7 +1,7 @@ # GEP-1731: HTTPRoute Retries * Issue: [#1731](https://github.com/kubernetes-sigs/gateway-api/issues/1731) -* Status: Implementable +* Status: Experimental (See status definitions [here](/geps/overview/#gep-states).) @@ -304,12 +304,12 @@ type HTTPRouteRetry struct { // route, the entire duration of the initial request and any retry attempts // MUST not exceed the Request timeout duration. If any retry attempts are // still in progress when the Request timeout duration has been reached, - // these SHOULD be cancelled if possible and the Gateway MUST immediately + // these SHOULD be canceled if possible and the Gateway MUST immediately // return a timeout error. // // If a BackendRequest timeout (`rules[].timeouts.backendRequest`) is // configured on the route, any retry attempts which reach the configured - // BackendRequest timeout duration without a response SHOULD be cancelled if + // BackendRequest timeout duration without a response SHOULD be canceled if // possible and the Gateway should wait for at least the specified backoff // duration before attempting to retry the backend request again. // diff --git a/geps/gep-1731/metadata.yaml b/geps/gep-1731/metadata.yaml index ae66af257c..beb073820f 100644 --- a/geps/gep-1731/metadata.yaml +++ b/geps/gep-1731/metadata.yaml @@ -2,7 +2,7 @@ apiVersion: internal.gateway.networking.k8s.io/v1alpha1 kind: GEPDetails number: 1731 name: HTTPRoute Retries -status: Implementable +status: Experimental # Any authors who contribute to the GEP in any way should be listed here using # their Github handle. authors: diff --git a/mkdocs.yml b/mkdocs.yml index e67c67f8af..5729769adb 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -125,11 +125,10 @@ nav: - geps/gep-2649/index.md - Implementable: - geps/gep-995/index.md - - geps/gep-1731/index.md - geps/gep-3155/index.md - - geps/gep-1731/index.md - Experimental: - geps/gep-1619/index.md + - geps/gep-1731/index.md - geps/gep-1748/index.md - geps/gep-1762/index.md - geps/gep-1897/index.md diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 72809856fe..00cb1c573f 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -123,6 +123,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/gateway-api/apis/v1.HTTPRouteFilter": schema_sigsk8sio_gateway_api_apis_v1_HTTPRouteFilter(ref), "sigs.k8s.io/gateway-api/apis/v1.HTTPRouteList": schema_sigsk8sio_gateway_api_apis_v1_HTTPRouteList(ref), "sigs.k8s.io/gateway-api/apis/v1.HTTPRouteMatch": schema_sigsk8sio_gateway_api_apis_v1_HTTPRouteMatch(ref), + "sigs.k8s.io/gateway-api/apis/v1.HTTPRouteRetry": schema_sigsk8sio_gateway_api_apis_v1_HTTPRouteRetry(ref), "sigs.k8s.io/gateway-api/apis/v1.HTTPRouteRule": schema_sigsk8sio_gateway_api_apis_v1_HTTPRouteRule(ref), "sigs.k8s.io/gateway-api/apis/v1.HTTPRouteSpec": schema_sigsk8sio_gateway_api_apis_v1_HTTPRouteSpec(ref), "sigs.k8s.io/gateway-api/apis/v1.HTTPRouteStatus": schema_sigsk8sio_gateway_api_apis_v1_HTTPRouteStatus(ref), @@ -4700,6 +4701,48 @@ func schema_sigsk8sio_gateway_api_apis_v1_HTTPRouteMatch(ref common.ReferenceCal } } +func schema_sigsk8sio_gateway_api_apis_v1_HTTPRouteRetry(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HTTPRouteRetry defines retry configuration for an HTTPRoute.\n\nImplementations SHOULD retry on connection errors (disconnect, reset, timeout, TCP failure) if a retry stanza is configured.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "codes": { + SchemaProps: spec.SchemaProps{ + Description: "Codes defines the HTTP response status codes for which a backend request should be retried.\n\nSupport: Extended", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + "attempts": { + SchemaProps: spec.SchemaProps{ + Description: "Attempts specifies the maxmimum number of times an individual request from the gateway to a backend should be retried.\n\nIf the maximum number of retries has been attempted without a successful response from the backend, the Gateway MUST return an error.\n\nWhen this field is unspecified, the number of times to attempt to retry a backend request is implementation-specific.\n\nSupport: Extended", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "backoff": { + SchemaProps: spec.SchemaProps{ + Description: "Backoff specifies the minimum duration a Gateway should wait between retry attempts and is represented in Gateway API Duration formatting.\n\nFor example, setting the `rules[].retry.backoff` field to the value `100ms` will cause a backend request to first be retried approximately 100 milliseconds after timing out or receiving a response code configured to be retryable.\n\nAn implementation MAY use an exponential or alternative backoff strategy for subsequent retry attempts, MAY cap the maximum backoff duration to some amount greater than the specified minimum, and MAY add arbitrary jitter to stagger requests, as long as unsuccessful backend requests are not retried before the configured minimum duration.\n\nIf a Request timeout (`rules[].timeouts.request`) is configured on the route, the entire duration of the initial request and any retry attempts MUST not exceed the Request timeout duration. If any retry attempts are still in progress when the Request timeout duration has been reached, these SHOULD be canceled if possible and the Gateway MUST immediately return a timeout error.\n\nIf a BackendRequest timeout (`rules[].timeouts.backendRequest`) is configured on the route, any retry attempts which reach the configured BackendRequest timeout duration without a response SHOULD be canceled if possible and the Gateway should wait for at least the specified backoff duration before attempting to retry the backend request again.\n\nIf a BackendRequest timeout is _not_ configured on the route, retry attempts MAY time out after an implementation default duration, or MAY remain pending until a configured Request timeout or implementation default duration for total request time is reached.\n\nWhen this field is unspecified, the time to wait between retry attempts is implementation-specific.\n\nSupport: Extended", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_sigsk8sio_gateway_api_apis_v1_HTTPRouteRule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -4762,6 +4805,12 @@ func schema_sigsk8sio_gateway_api_apis_v1_HTTPRouteRule(ref common.ReferenceCall Ref: ref("sigs.k8s.io/gateway-api/apis/v1.HTTPRouteTimeouts"), }, }, + "retry": { + SchemaProps: spec.SchemaProps{ + Description: "Retry defines the configuration for when to retry an HTTP request.\n\nSupport: Extended\n\n", + Ref: ref("sigs.k8s.io/gateway-api/apis/v1.HTTPRouteRetry"), + }, + }, "sessionPersistence": { SchemaProps: spec.SchemaProps{ Description: "SessionPersistence defines and configures session persistence for the route rule.\n\nSupport: Extended\n\n", @@ -4772,7 +4821,7 @@ func schema_sigsk8sio_gateway_api_apis_v1_HTTPRouteRule(ref common.ReferenceCall }, }, Dependencies: []string{ - "sigs.k8s.io/gateway-api/apis/v1.HTTPBackendRef", "sigs.k8s.io/gateway-api/apis/v1.HTTPRouteFilter", "sigs.k8s.io/gateway-api/apis/v1.HTTPRouteMatch", "sigs.k8s.io/gateway-api/apis/v1.HTTPRouteTimeouts", "sigs.k8s.io/gateway-api/apis/v1.SessionPersistence"}, + "sigs.k8s.io/gateway-api/apis/v1.HTTPBackendRef", "sigs.k8s.io/gateway-api/apis/v1.HTTPRouteFilter", "sigs.k8s.io/gateway-api/apis/v1.HTTPRouteMatch", "sigs.k8s.io/gateway-api/apis/v1.HTTPRouteRetry", "sigs.k8s.io/gateway-api/apis/v1.HTTPRouteTimeouts", "sigs.k8s.io/gateway-api/apis/v1.SessionPersistence"}, } }