Skip to content

Commit

Permalink
change naming
Browse files Browse the repository at this point in the history
Signed-off-by: Guy Daich <[email protected]>
  • Loading branch information
guydc committed Jul 31, 2024
1 parent 3119ef0 commit c708977
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion api/v1alpha1/shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,5 +508,5 @@ type HTTP2Settings struct {
// https://www.envoyproxy.io/docs/envoy/latest/configuration/best_practices/level_two
// Default: true
// +optional
TerminateConnectionOnMessagingError *bool `json:"terminateConnectionOnMessagingError,omitempty"`
TerminateConnOnError *bool `json:"terminateConnOnError,omitempty"`
}
4 changes: 2 additions & 2 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ spec:
maximum: 2147483647
minimum: 1
type: integer
terminateConnectionOnMessagingError:
terminateConnOnError:
description: |-
ResetConnectionOnError determines if Envoy will terminate the connection or just the offending stream in the event of HTTP messaging error
It's recommended for L2 Envoy deployments to set this value to false.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ spec:
maximum: 2147483647
minimum: 1
type: integer
terminateConnectionOnMessagingError:
terminateConnOnError:
description: |-
ResetConnectionOnError determines if Envoy will terminate the connection or just the offending stream in the event of HTTP messaging error
It's recommended for L2 Envoy deployments to set this value to false.
Expand Down
2 changes: 1 addition & 1 deletion internal/gatewayapi/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func buildIRHTTP2Settings(http2Settings *egv1a1.HTTP2Settings) (*ir.HTTP2Setting

http2.MaxConcurrentStreams = http2Settings.MaxConcurrentStreams

http2.TerminateConnectionOnMessagingError = http2Settings.TerminateConnectionOnMessagingError
http2.TerminateConnOnError = http2Settings.TerminateConnOnError

return http2, errs
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ backendTrafficPolicies:
initialStreamWindowSize: 1Mi
initialConnectionWindowSize: 500Mi
maxConcurrentStreams: 200
terminateConnectionOnMessagingError: false
terminateConnOnError: false
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ backendTrafficPolicies:
initialConnectionWindowSize: 500Mi
initialStreamWindowSize: 1Mi
maxConcurrentStreams: 200
terminateConnectionOnMessagingError: false
terminateConnOnError: false
targetRef:
group: gateway.networking.k8s.io
kind: HTTPRoute
Expand Down Expand Up @@ -331,4 +331,4 @@ xdsIR:
initialConnectionWindowSize: 1048576
initialStreamWindowSize: 524288000
maxConcurrentStreams: 200
terminateConnectionOnMessagingError: false
terminateConnOnError: false
4 changes: 2 additions & 2 deletions internal/ir/xds.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,8 @@ type HTTP2Settings struct {
InitialConnectionWindowSize *uint32 `json:"initialStreamWindowSize,omitempty" yaml:"initialStreamWindowSize,omitempty"`
// MaxConcurrentStreams is the maximum number of concurrent streams that can be opened on a connection.
MaxConcurrentStreams *uint32 `json:"maxConcurrentStreams,omitempty" yaml:"maxConcurrentStreams,omitempty"`
// TerminateConnectionOnMessagingError determines if a stream or connection is reset on messaging error.
TerminateConnectionOnMessagingError *bool `json:"terminateConnectionOnMessagingError,omitempty" yaml:"terminateConnectionOnMessagingError,omitempty"`
// TerminateConnOnError determines if a stream or connection is reset on messaging error.
TerminateConnOnError *bool `json:"terminateConnOnError,omitempty" yaml:"terminateConnOnError,omitempty"`
}

// HealthCheckSettings provides HealthCheck configuration on the HTTP/HTTPS listener.
Expand Down
4 changes: 2 additions & 2 deletions internal/ir/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/xds/translator/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -674,9 +674,9 @@ func buildHTTP2Settings(opts *ir.HTTP2Settings) *corev3.Http2ProtocolOptions {
}
}

if opts.TerminateConnectionOnMessagingError != nil {
if opts.TerminateConnOnError != nil {
out.OverrideStreamErrorOnInvalidHttpMessage = &wrapperspb.BoolValue{
Value: !*opts.TerminateConnectionOnMessagingError,
Value: !*opts.TerminateConnOnError,
}
}

Expand Down
4 changes: 2 additions & 2 deletions internal/xds/translator/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ func http2ProtocolOptions(opts *ir.HTTP2Settings) *corev3.Http2ProtocolOptions {
},
}

if opts.TerminateConnectionOnMessagingError != nil {
if opts.TerminateConnOnError != nil {
out.OverrideStreamErrorOnInvalidHttpMessage = &wrapperspb.BoolValue{
Value: !*opts.TerminateConnectionOnMessagingError,
Value: !*opts.TerminateConnOnError,
}
}

Expand Down
6 changes: 3 additions & 3 deletions internal/xds/translator/testdata/in/xds-ir/http2-route.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ http:
initialConnectionWindowSize: 1048576
initialStreamWindowSize: 524288000
maxConcurrentStreams: 200
terminateConnectionOnMessagingError: false
terminateConnOnError: false
- name: "second-route"
hostname: "*"
pathMatch:
Expand Down Expand Up @@ -66,7 +66,7 @@ http:
initialConnectionWindowSize: 1048576
initialStreamWindowSize: 524288000
maxConcurrentStreams: 200
terminateConnectionOnMessagingError: true
terminateConnOnError: true
- name: "fourth-route-not-http2"
hostname: "*"
pathMatch:
Expand All @@ -83,4 +83,4 @@ http:
initialConnectionWindowSize: 1048576
initialStreamWindowSize: 524288000
maxConcurrentStreams: 200
terminateConnectionOnMessagingError: false
terminateConnOnError: false
2 changes: 1 addition & 1 deletion site/content/en/latest/api/extension_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -1785,7 +1785,7 @@ _Appears in:_
| `initialStreamWindowSize` | _[Quantity](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#quantity-resource-api)_ | false | InitialStreamWindowSize sets the initial window size for HTTP/2 streams.<br />If not set, the default value is 64 KiB(64*1024). |
| `initialConnectionWindowSize` | _[Quantity](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#quantity-resource-api)_ | false | InitialConnectionWindowSize sets the initial window size for HTTP/2 connections.<br />If not set, the default value is 1 MiB. |
| `maxConcurrentStreams` | _integer_ | false | MaxConcurrentStreams sets the maximum number of concurrent streams allowed per connection.<br />If not set, the default value is 100. |
| `terminateConnectionOnMessagingError` | _boolean_ | false | ResetConnectionOnError determines if Envoy will terminate the connection or just the offending stream in the event of HTTP messaging error<br />It's recommended for L2 Envoy deployments to set this value to false.<br />https://www.envoyproxy.io/docs/envoy/latest/configuration/best_practices/level_two<br />Default: true |
| `terminateConnOnError` | _boolean_ | false | ResetConnectionOnError determines if Envoy will terminate the connection or just the offending stream in the event of HTTP messaging error<br />It's recommended for L2 Envoy deployments to set this value to false.<br />https://www.envoyproxy.io/docs/envoy/latest/configuration/best_practices/level_two<br />Default: true |


#### HTTP3Settings
Expand Down
2 changes: 1 addition & 1 deletion site/content/zh/latest/api/extension_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -1785,7 +1785,7 @@ _Appears in:_
| `initialStreamWindowSize` | _[Quantity](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#quantity-resource-api)_ | false | InitialStreamWindowSize sets the initial window size for HTTP/2 streams.<br />If not set, the default value is 64 KiB(64*1024). |
| `initialConnectionWindowSize` | _[Quantity](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#quantity-resource-api)_ | false | InitialConnectionWindowSize sets the initial window size for HTTP/2 connections.<br />If not set, the default value is 1 MiB. |
| `maxConcurrentStreams` | _integer_ | false | MaxConcurrentStreams sets the maximum number of concurrent streams allowed per connection.<br />If not set, the default value is 100. |
| `terminateConnectionOnMessagingError` | _boolean_ | false | ResetConnectionOnError determines if Envoy will terminate the connection or just the offending stream in the event of HTTP messaging error<br />It's recommended for L2 Envoy deployments to set this value to false.<br />https://www.envoyproxy.io/docs/envoy/latest/configuration/best_practices/level_two<br />Default: true |
| `terminateConnOnError` | _boolean_ | false | ResetConnectionOnError determines if Envoy will terminate the connection or just the offending stream in the event of HTTP messaging error<br />It's recommended for L2 Envoy deployments to set this value to false.<br />https://www.envoyproxy.io/docs/envoy/latest/configuration/best_practices/level_two<br />Default: true |


#### HTTP3Settings
Expand Down

0 comments on commit c708977

Please sign in to comment.