Skip to content

Commit 5d96dd4

Browse files
committed
run make gen
Signed-off-by: Jake Oliver <jake@truelayer.com>
1 parent 16480c9 commit 5d96dd4

5 files changed

Lines changed: 48 additions & 2 deletions

File tree

internal/gatewayapi/testdata/envoyextensionpolicy-shadowmode.out.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ envoyExtensionPolicies:
99
- backendRefs:
1010
- name: grpc-backend
1111
port: 9000
12-
shadowMode: true
1312
processingMode:
1413
request:
1514
body: Streamed
1615
response:
1716
body: Streamed
17+
shadowMode: true
1818
targetRef:
1919
group: gateway.networking.k8s.io
2020
kind: HTTPRoute
@@ -220,11 +220,11 @@ xdsIR:
220220
protocol: GRPC
221221
weight: 1
222222
name: envoyextensionpolicy/default/policy-for-http-route/extproc/0
223-
shadowMode: true
224223
requestBodyProcessingMode: Streamed
225224
requestHeaderProcessing: true
226225
responseBodyProcessingMode: Streamed
227226
responseHeaderProcessing: true
227+
shadowMode: true
228228
hostname: www.foo.com
229229
isHTTP2: false
230230
metadata:

site/content/en/latest/api/extension_types.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,6 +2259,7 @@ _Appears in:_
22592259
| `messageTimeout` | _[Duration](https://gateway-api.sigs.k8s.io/reference/1.5/spec/#duration)_ | false | | MessageTimeout is the timeout for a response to be returned from the external processor<br />Default: 200ms |
22602260
| `failOpen` | _boolean_ | false | false | FailOpen is a switch used to control the behavior when failing to call the external processor.<br />If FailOpen is set to true, the system bypasses the ExtProc extension and<br />allows the traffic to pass through. If it is set to false or<br />not set (defaulting to false), the system blocks the traffic and returns<br />an HTTP 5xx error.<br />If set to true, the ExtProc extension will also be bypassed if the configuration is invalid. |
22612261
| `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 |
2262+
| `shadowMode` | _boolean_ | false | | ShadowMode sets if envoy gateway should treat this external processor as "send and go".<br />When enabled, Envoy forwards request/response data to the external processor but does<br />not wait for or apply any response from it. This maps to Envoy's `observability_mode`<br />on the ext_proc filter.<br />Defaults to false. |
22622263
| `metadata` | _[ExtProcMetadata](#extprocmetadata)_ | false | | Refer to Kubernetes API documentation for fields of `metadata`. |
22632264

22642265

test/helm/gateway-crds-helm/all.out.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29557,6 +29557,14 @@ spec:
2955729557
type: string
2955829558
type: object
2955929559
type: object
29560+
shadowMode:
29561+
description: |-
29562+
ShadowMode sets if envoy gateway should treat this external processor as "send and go".
29563+
When enabled, Envoy forwards request/response data to the external processor but does
29564+
not wait for or apply any response from it. This maps to Envoy's `observability_mode`
29565+
on the ext_proc filter.
29566+
Defaults to false.
29567+
type: boolean
2956029568
type: object
2956129569
x-kubernetes-validations:
2956229570
- message: BackendRefs must be used, backendRef is not supported.
@@ -29578,6 +29586,13 @@ spec:
2957829586
&& self.processingMode.request.body == ''FullDuplexStreamed'')
2957929587
|| (has(self.processingMode.response) && has(self.processingMode.response.body)
2958029588
&& self.processingMode.response.body == ''FullDuplexStreamed'')))'
29589+
- message: If shadowMode is enabled, body processing mode must be
29590+
Streamed or unset.
29591+
rule: '!(has(self.shadowMode) && self.shadowMode == true && has(self.processingMode)
29592+
&& ((has(self.processingMode.request) && has(self.processingMode.request.body)
29593+
&& self.processingMode.request.body != ''Streamed'') || (has(self.processingMode.response)
29594+
&& has(self.processingMode.response.body) && self.processingMode.response.body
29595+
!= ''Streamed'')))'
2958129596
maxItems: 16
2958229597
type: array
2958329598
lua:

test/helm/gateway-crds-helm/e2e.out.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7530,6 +7530,14 @@ spec:
75307530
type: string
75317531
type: object
75327532
type: object
7533+
shadowMode:
7534+
description: |-
7535+
ShadowMode sets if envoy gateway should treat this external processor as "send and go".
7536+
When enabled, Envoy forwards request/response data to the external processor but does
7537+
not wait for or apply any response from it. This maps to Envoy's `observability_mode`
7538+
on the ext_proc filter.
7539+
Defaults to false.
7540+
type: boolean
75337541
type: object
75347542
x-kubernetes-validations:
75357543
- message: BackendRefs must be used, backendRef is not supported.
@@ -7551,6 +7559,13 @@ spec:
75517559
&& self.processingMode.request.body == ''FullDuplexStreamed'')
75527560
|| (has(self.processingMode.response) && has(self.processingMode.response.body)
75537561
&& self.processingMode.response.body == ''FullDuplexStreamed'')))'
7562+
- message: If shadowMode is enabled, body processing mode must be
7563+
Streamed or unset.
7564+
rule: '!(has(self.shadowMode) && self.shadowMode == true && has(self.processingMode)
7565+
&& ((has(self.processingMode.request) && has(self.processingMode.request.body)
7566+
&& self.processingMode.request.body != ''Streamed'') || (has(self.processingMode.response)
7567+
&& has(self.processingMode.response.body) && self.processingMode.response.body
7568+
!= ''Streamed'')))'
75547569
maxItems: 16
75557570
type: array
75567571
lua:

test/helm/gateway-crds-helm/envoy-gateway-crds.out.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7530,6 +7530,14 @@ spec:
75307530
type: string
75317531
type: object
75327532
type: object
7533+
shadowMode:
7534+
description: |-
7535+
ShadowMode sets if envoy gateway should treat this external processor as "send and go".
7536+
When enabled, Envoy forwards request/response data to the external processor but does
7537+
not wait for or apply any response from it. This maps to Envoy's `observability_mode`
7538+
on the ext_proc filter.
7539+
Defaults to false.
7540+
type: boolean
75337541
type: object
75347542
x-kubernetes-validations:
75357543
- message: BackendRefs must be used, backendRef is not supported.
@@ -7551,6 +7559,13 @@ spec:
75517559
&& self.processingMode.request.body == ''FullDuplexStreamed'')
75527560
|| (has(self.processingMode.response) && has(self.processingMode.response.body)
75537561
&& self.processingMode.response.body == ''FullDuplexStreamed'')))'
7562+
- message: If shadowMode is enabled, body processing mode must be
7563+
Streamed or unset.
7564+
rule: '!(has(self.shadowMode) && self.shadowMode == true && has(self.processingMode)
7565+
&& ((has(self.processingMode.request) && has(self.processingMode.request.body)
7566+
&& self.processingMode.request.body != ''Streamed'') || (has(self.processingMode.response)
7567+
&& has(self.processingMode.response.body) && self.processingMode.response.body
7568+
!= ''Streamed'')))'
75547569
maxItems: 16
75557570
type: array
75567571
lua:

0 commit comments

Comments
 (0)