Skip to content
27 changes: 27 additions & 0 deletions api/v1alpha1/shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,33 @@ type HTTP2Settings struct {
// Default: TerminateConnection
// +optional
OnInvalidMessage *InvalidMessageAction `json:"onInvalidMessage,omitempty"`

// ConnectionKeepalive configures HTTP/2 connection keepalive using PING frames.
// +optional
ConnectionKeepalive *HTTP2ConnectionKeepalive `json:"connectionKeepalive,omitempty"`
}

// HTTP2ConnectionKeepalive configures HTTP/2 PING-based keepalive settings.
// +kubebuilder:validation:XValidation:rule="!has(self.timeout) || !has(self.interval) || duration(self.timeout) < duration(self.interval)",message="timeout must be less than interval"
type HTTP2ConnectionKeepalive struct {
// Interval specifies how often to send HTTP/2 PING frames to keep the connection alive.
// +optional
Interval *gwapiv1.Duration `json:"interval,omitempty"`

// Timeout specifies how long to wait for a PING response before considering the connection dead.
// +optional
Timeout *gwapiv1.Duration `json:"timeout,omitempty"`

// IntervalJitter specifies a random jitter percentage added to each interval.
// Defaults to 15% if not specified.
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=100
// +optional
IntervalJitter *uint32 `json:"intervalJitter,omitempty"`

// ConnectionIdleInterval specifies how long a connection must be idle before a PING is sent.
// +optional
ConnectionIdleInterval *gwapiv1.Duration `json:"connectionIdleInterval,omitempty"`
}

// ResponseOverride defines the configuration to override specific responses with a custom one.
Expand Down
40 changes: 40 additions & 0 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 @@ -649,6 +649,38 @@ spec:
http2:
description: HTTP2 provides HTTP/2 configuration for backend connections.
properties:
connectionKeepalive:
description: ConnectionKeepalive configures HTTP/2 connection
keepalive using PING frames.
properties:
connectionIdleInterval:
description: ConnectionIdleInterval specifies how long a connection
must be idle before a PING is sent.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
interval:
description: Interval specifies how often to send HTTP/2 PING
frames to keep the connection alive.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
intervalJitter:
description: |-
IntervalJitter specifies a random jitter percentage added to each interval.
Defaults to 15% if not specified.
format: int32
maximum: 100
minimum: 0
type: integer
timeout:
description: Timeout specifies how long to wait for a PING
response before considering the connection dead.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
x-kubernetes-validations:
- message: timeout must be less than interval
rule: '!has(self.timeout) || !has(self.interval) || duration(self.timeout)
< duration(self.interval)'
initialConnectionWindowSize:
allOf:
- pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,38 @@ spec:
http2:
description: HTTP2 provides HTTP/2 configuration on the listener.
properties:
connectionKeepalive:
description: ConnectionKeepalive configures HTTP/2 connection
keepalive using PING frames.
properties:
connectionIdleInterval:
description: ConnectionIdleInterval specifies how long a connection
must be idle before a PING is sent.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
interval:
description: Interval specifies how often to send HTTP/2 PING
frames to keep the connection alive.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
intervalJitter:
description: |-
IntervalJitter specifies a random jitter percentage added to each interval.
Defaults to 15% if not specified.
format: int32
maximum: 100
minimum: 0
type: integer
timeout:
description: Timeout specifies how long to wait for a PING
response before considering the connection dead.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
x-kubernetes-validations:
- message: timeout must be less than interval
rule: '!has(self.timeout) || !has(self.interval) || duration(self.timeout)
< duration(self.interval)'
initialConnectionWindowSize:
allOf:
- pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,40 @@ spec:
description: HTTP2 provides HTTP/2 configuration for backend
connections.
properties:
connectionKeepalive:
description: ConnectionKeepalive configures HTTP/2 connection
keepalive using PING frames.
properties:
connectionIdleInterval:
description: ConnectionIdleInterval specifies how
long a connection must be idle before a PING is
sent.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
interval:
description: Interval specifies how often to send
HTTP/2 PING frames to keep the connection alive.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
intervalJitter:
description: |-
IntervalJitter specifies a random jitter percentage added to each interval.
Defaults to 15% if not specified.
format: int32
maximum: 100
minimum: 0
type: integer
timeout:
description: Timeout specifies how long to wait
for a PING response before considering the connection
dead.
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
type: object
x-kubernetes-validations:
- message: timeout must be less than interval
rule: '!has(self.timeout) || !has(self.interval) ||
duration(self.timeout) < duration(self.interval)'
initialConnectionWindowSize:
allOf:
- pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
Expand Down
Loading
Loading