Skip to content

Commit c93959c

Browse files
authored
network_services: add forwardAttributes field for service extensions (#18003)
1 parent 7c0bd04 commit c93959c

7 files changed

Lines changed: 42 additions & 0 deletions

File tree

mmv1/products/networkservices/LbEdgeExtension.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,18 @@ properties:
168168
If omitted, all headers are sent. Each element is a string indicating the header name.
169169
item_type:
170170
type: String
171+
- name: 'forwardAttributes'
172+
type: Array
173+
description: |
174+
List of the Envoy attributes to forward to the extension server. The attributes
175+
provided here are included as part of the `ProcessingRequest.attributes` field
176+
(of type `map`), where the keys are the attribute names. Refer to the
177+
[documentation](https://docs.cloud.google.com/service-extensions/docs/attributes)
178+
for the names of attributes that can be forwarded. If omitted, no attributes
179+
are sent. Each element is a string indicating the attribute name.
180+
item_type:
181+
type: String
182+
max_size: 16
171183
- name: 'loadBalancingScheme'
172184
type: Enum
173185
description: |

mmv1/products/networkservices/LbRouteExtension.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,18 @@ properties:
208208
If omitted, all headers are sent. Each element is a string indicating the header name.
209209
item_type:
210210
type: String
211+
- name: 'forwardAttributes'
212+
type: Array
213+
description: |
214+
List of the Envoy attributes to forward to the extension server. The attributes
215+
provided here are included as part of the `ProcessingRequest.attributes` field
216+
(of type `map`), where the keys are the attribute names. Refer to the
217+
[documentation](https://docs.cloud.google.com/service-extensions/docs/attributes)
218+
for the names of attributes that can be forwarded. If omitted, no attributes
219+
are sent. Each element is a string indicating the attribute name.
220+
item_type:
221+
type: String
222+
max_size: 16
211223
- name: 'supportedEvents'
212224
type: Array
213225
is_set: true

mmv1/products/networkservices/LbTrafficExtension.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,18 @@ properties:
180180
If omitted, all headers are sent. Each element is a string indicating the header name.
181181
item_type:
182182
type: String
183+
- name: 'forwardAttributes'
184+
type: Array
185+
description: |
186+
List of the Envoy attributes to forward to the extension server. The attributes
187+
provided here are included as part of the `ProcessingRequest.attributes` field
188+
(of type `map`), where the keys are the attribute names. Refer to the
189+
[documentation](https://docs.cloud.google.com/service-extensions/docs/attributes)
190+
for the names of attributes that can be forwarded. If omitted, no attributes
191+
are sent. Each element is a string indicating the attribute name.
192+
item_type:
193+
type: String
194+
max_size: 16
183195
- name: 'supportedEvents'
184196
type: Array
185197
description: |

mmv1/templates/terraform/examples/network_services_lb_edge_extension_basic.tf.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ resource "google_network_services_lb_edge_extension" "{{$.PrimaryResourceId}}" {
6363
fail_open = false
6464
supported_events = ["REQUEST_HEADERS"]
6565
forward_headers = ["custom-header"]
66+
forward_attributes = ["request.host", "request.path"]
6667
}
6768
}
6869

mmv1/templates/terraform/examples/network_services_lb_route_extension_basic.tf.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ resource "google_network_services_lb_route_extension" "{{$.PrimaryResourceId}}"
210210
fail_open = false
211211

212212
forward_headers = ["custom-header"]
213+
forward_attributes = ["request.host", "request.path"]
213214

214215
supported_events = ["REQUEST_HEADERS", "REQUEST_BODY", "REQUEST_TRAILERS"]
215216
request_body_send_mode = "BODY_SEND_MODE_FULL_DUPLEX_STREAMED"

mmv1/templates/terraform/examples/network_services_lb_traffic_extension_basic.tf.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ resource "google_network_services_lb_traffic_extension" "{{$.PrimaryResourceId}}
202202

203203
supported_events = ["REQUEST_HEADERS"]
204204
forward_headers = ["custom-header"]
205+
forward_attributes = ["request.host", "request.path"]
205206
metadata = {
206207
"key1" = "value1"
207208
"key2" = "value2"

mmv1/third_party/terraform/services/networkservices/resource_network_services_lb_edge_extension_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ resource "google_network_services_lb_edge_extension" "default" {
146146
fail_open = false
147147
supported_events = ["REQUEST_HEADERS"]
148148
forward_headers = ["custom-header"]
149+
forward_attributes = ["request.host", "request.path"]
149150
}
150151
}
151152
@@ -275,6 +276,7 @@ resource "google_network_services_lb_edge_extension" "default" {
275276
fail_open = false
276277
supported_events = ["REQUEST_HEADERS"]
277278
forward_headers = ["custom-header"]
279+
forward_attributes = ["request.host", "request.path", "request.scheme"]
278280
}
279281
}
280282
@@ -291,6 +293,7 @@ resource "google_network_services_lb_edge_extension" "default" {
291293
fail_open = true
292294
supported_events = ["REQUEST_HEADERS"]
293295
forward_headers = ["testing-header"]
296+
forward_attributes = ["request.host"]
294297
}
295298
}
296299

0 commit comments

Comments
 (0)