Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: add Untyped metadata support in ExtProc #4160

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 12 additions & 0 deletions api/v1alpha1/ext_proc_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,16 @@ type ExtProc struct {
//
// +optional
ProcessingMode *ExtProcProcessingMode `json:"processingMode,omitempty"`

// MetadataOptions defines the metadata that should be forwarded to or received from the external processor.
//
// +optional
Metadata *MetadataOptions `json:"metadata,omitempty"`
}

type MetadataOptions struct {
// ForwardingNamespaces is a list of namespaces from which metadata should be forwarded to the external processor.
ForwardingNamespaces []string `json:"forwardingNamespaces,omitempty"`
zirain marked this conversation as resolved.
Show resolved Hide resolved
// ReceivingNamespaces is a list of namespaces from which metadata should be received from the external processor.
ReceivingNamespaces []string `json:"receivingNamespaces,omitempty"`
}
30 changes: 30 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 @@ -823,6 +823,25 @@ spec:
Default: 200ms
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
metadata:
description: MetadataOptions defines the metadata that should
be forwarded to or received from the external processor.
properties:
forwardingNamespaces:
description: ForwardingNamespaces is a list of namespaces
from which metadata should be forwarded to the external
processor.
items:
type: string
type: array
receivingNamespaces:
description: ReceivingNamespaces is a list of namespaces
from which metadata should be received from the external
processor.
items:
type: string
type: array
type: object
processingMode:
description: |-
ProcessingMode defines how request and response body is processed
Expand Down
16 changes: 16 additions & 0 deletions site/content/en/latest/api/extension_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,7 @@ _Appears in:_
| `messageTimeout` | _[Duration](https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1.Duration)_ | false | MessageTimeout is the timeout for a response to be returned from the external processor<br />Default: 200ms |
| `failOpen` | _boolean_ | false | FailOpen defines if requests or responses that cannot be processed due to connectivity to the<br />external processor are terminated or passed-through.<br />Default: false |
| `processingMode` | _[ExtProcProcessingMode](#extprocprocessingmode)_ | false | ProcessingMode defines how request and response body is processed<br />Default: header and body are not sent to the external processor |
| `metadata` | _[MetadataOptions](#metadataoptions)_ | false | Refer to Kubernetes API documentation for fields of `metadata`. |


#### ExtProcBodyProcessingMode
Expand Down Expand Up @@ -2450,6 +2451,21 @@ _Appears in:_



#### MetadataOptions





_Appears in:_
- [ExtProc](#extproc)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `forwardingNamespaces` | _string array_ | true | ForwardingNamespaces is a list of namespaces from which metadata should be forwarded to the external processor. |
| `receivingNamespaces` | _string array_ | true | ReceivingNamespaces is a list of namespaces from which metadata should be received from the external processor. |


#### MetricSinkType

_Underlying type:_ _string_
Expand Down
16 changes: 16 additions & 0 deletions site/content/zh/latest/api/extension_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,7 @@ _Appears in:_
| `messageTimeout` | _[Duration](https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1.Duration)_ | false | MessageTimeout is the timeout for a response to be returned from the external processor<br />Default: 200ms |
| `failOpen` | _boolean_ | false | FailOpen defines if requests or responses that cannot be processed due to connectivity to the<br />external processor are terminated or passed-through.<br />Default: false |
| `processingMode` | _[ExtProcProcessingMode](#extprocprocessingmode)_ | false | ProcessingMode defines how request and response body is processed<br />Default: header and body are not sent to the external processor |
| `metadata` | _[MetadataOptions](#metadataoptions)_ | false | Refer to Kubernetes API documentation for fields of `metadata`. |


#### ExtProcBodyProcessingMode
Expand Down Expand Up @@ -2450,6 +2451,21 @@ _Appears in:_



#### MetadataOptions





_Appears in:_
- [ExtProc](#extproc)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `forwardingNamespaces` | _string array_ | true | ForwardingNamespaces is a list of namespaces from which metadata should be forwarded to the external processor. |
| `receivingNamespaces` | _string array_ | true | ReceivingNamespaces is a list of namespaces from which metadata should be received from the external processor. |


#### MetricSinkType

_Underlying type:_ _string_
Expand Down
Loading