Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions api/v1alpha1/ext_proc_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ type ExtProc struct {
//
// +optional
Metadata *ExtProcMetadata `json:"metadata,omitempty"`

// Percentage controls what percentage of requests are sent through this ExtProc extension.
// When not specified, 100% of requests are sent through the extension.
//
// +optional
Percentage *gwapiv1.Fraction `json:"percentage,omitempty"`
}

// ExtProcMetadata defines options related to the sending and receiving of dynamic metadata to and from the
Expand Down
6 changes: 6 additions & 0 deletions api/v1alpha1/lua_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,10 @@ type Lua struct {
// +optional
// +unionMember
ValueRef *gwapiv1.LocalObjectReference `json:"valueRef,omitempty"`

// Percentage controls what percentage of requests are sent through this Lua extension.
// When not specified, 100% of requests are sent through the extension.
//
// +optional
Percentage *gwapiv1.Fraction `json:"percentage,omitempty"`
}
6 changes: 6 additions & 0 deletions api/v1alpha1/wasm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ type Wasm struct {
// Env configures the environment for the Wasm extension
// +optional
Env *WasmEnv `json:"env,omitempty"`

// Percentage controls what percentage of requests are sent through this Wasm extension.
// When not specified, 100% of requests are sent through the extension.
//
// +optional
Percentage *gwapiv1.Fraction `json:"percentage,omitempty"`
}

// WasmCodeSource defines the source of the Wasm code.
Expand Down
15 changes: 15 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 @@ -1509,6 +1509,26 @@ spec:
Envoy HTTP filter namespaces
rule: self.all(f, !f.startsWith('envoy.filters.http'))
type: object
percentage:
description: |-
Percentage controls what percentage of requests are sent through this ExtProc extension.
When not specified, 100% of requests are sent through the extension.
properties:
denominator:
default: 100
format: int32
minimum: 1
type: integer
numerator:
format: int32
minimum: 0
type: integer
required:
- numerator
type: object
x-kubernetes-validations:
- message: numerator must be less than or equal to denominator
rule: self.numerator <= self.denominator
processingMode:
description: |-
ProcessingMode defines how request and response body is processed
Expand Down Expand Up @@ -1603,6 +1623,26 @@ spec:
inline:
description: Inline contains the source code as an inline string.
type: string
percentage:
description: |-
Percentage controls what percentage of requests are sent through this Lua extension.
When not specified, 100% of requests are sent through the extension.
properties:
denominator:
default: 100
format: int32
minimum: 1
type: integer
numerator:
format: int32
minimum: 0
type: integer
required:
- numerator
type: object
x-kubernetes-validations:
- message: numerator must be less than or equal to denominator
rule: self.numerator <= self.denominator
type:
default: Inline
description: |-
Expand Down Expand Up @@ -2109,6 +2149,26 @@ spec:
It's also used for logging/debugging.
If not specified, EG will generate a unique name for the Wasm extension.
type: string
percentage:
description: |-
Percentage controls what percentage of requests are sent through this Wasm extension.
When not specified, 100% of requests are sent through the extension.
properties:
denominator:
default: 100
format: int32
minimum: 1
type: integer
numerator:
format: int32
minimum: 0
type: integer
required:
- numerator
type: object
x-kubernetes-validations:
- message: numerator must be less than or equal to denominator
rule: self.numerator <= self.denominator
rootID:
description: |-
RootID is a unique ID for a set of extensions in a VM which will share a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1508,6 +1508,26 @@ spec:
Envoy HTTP filter namespaces
rule: self.all(f, !f.startsWith('envoy.filters.http'))
type: object
percentage:
description: |-
Percentage controls what percentage of requests are sent through this ExtProc extension.
When not specified, 100% of requests are sent through the extension.
properties:
denominator:
default: 100
format: int32
minimum: 1
type: integer
numerator:
format: int32
minimum: 0
type: integer
required:
- numerator
type: object
x-kubernetes-validations:
- message: numerator must be less than or equal to denominator
rule: self.numerator <= self.denominator
processingMode:
description: |-
ProcessingMode defines how request and response body is processed
Expand Down Expand Up @@ -1602,6 +1622,26 @@ spec:
inline:
description: Inline contains the source code as an inline string.
type: string
percentage:
description: |-
Percentage controls what percentage of requests are sent through this Lua extension.
When not specified, 100% of requests are sent through the extension.
properties:
denominator:
default: 100
format: int32
minimum: 1
type: integer
numerator:
format: int32
minimum: 0
type: integer
required:
- numerator
type: object
x-kubernetes-validations:
- message: numerator must be less than or equal to denominator
rule: self.numerator <= self.denominator
type:
default: Inline
description: |-
Expand Down Expand Up @@ -2108,6 +2148,26 @@ spec:
It's also used for logging/debugging.
If not specified, EG will generate a unique name for the Wasm extension.
type: string
percentage:
description: |-
Percentage controls what percentage of requests are sent through this Wasm extension.
When not specified, 100% of requests are sent through the extension.
properties:
denominator:
default: 100
format: int32
minimum: 1
type: integer
numerator:
format: int32
minimum: 0
type: integer
required:
- numerator
type: object
x-kubernetes-validations:
- message: numerator must be less than or equal to denominator
rule: self.numerator <= self.denominator
rootID:
description: |-
RootID is a unique ID for a set of extensions in a VM which will share a
Expand Down
Loading
Loading