@@ -28,7 +28,6 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
28
28
// **Current Implementation Status:**
29
29
// All options and processing modes are implemented except for the following:
30
30
//
31
- // * Dynamic metadata in responses from the external processor is ignored.
32
31
// * "async mode" is not implemented.
33
32
34
33
// The filter communicates with an external gRPC service called an "external processor"
@@ -97,7 +96,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
97
96
// <arch_overview_advanced_filter_state_sharing>` object in a namespace matching the filter
98
97
// name.
99
98
//
100
- // [#next-free-field: 16 ]
99
+ // [#next-free-field: 17 ]
101
100
message ExternalProcessor {
102
101
// Configuration for the gRPC service that the filter will communicate with.
103
102
// The filter supports both the "Envoy" and "Google" gRPC clients.
@@ -203,6 +202,35 @@ message ExternalProcessor {
203
202
// Instead, the stream to the external processor will be closed. There will be no
204
203
// more external processing for this stream from now on.
205
204
bool disable_immediate_response = 15 ;
205
+
206
+ // Options related to the sending and receiving of dynamic metadata.
207
+ MetadataOptions metadata_options = 16 ;
208
+ }
209
+
210
+ // The MetadataOptions structure defines options for the sending and receiving of
211
+ // dynamic metadata. Specifically, which namespaces to send to the server, whether
212
+ // metadata returned by the server may be written, and how that metadata may be written.
213
+ message MetadataOptions {
214
+ message MetadataNamespaces {
215
+ // Specifies a list of metadata namespaces whose values, if present,
216
+ // will be passed to the ext_proc service as an opaque *protobuf::Struct*.
217
+ repeated string untyped = 1 ;
218
+
219
+ // Specifies a list of metadata namespaces whose values, if present,
220
+ // will be passed to the ext_proc service as a *protobuf::Any*. This allows
221
+ // envoy and the external processing server to share the protobuf message
222
+ // definition for safe parsing.
223
+ repeated string typed = 2 ;
224
+ }
225
+
226
+ // Describes which typed or untyped dynamic metadata namespaces to forward to
227
+ // the external processing server.
228
+ MetadataNamespaces forwarding_namespaces = 1 ;
229
+
230
+ // Describes which typed or untyped dynamic metadata namespaces to accept from
231
+ // the external processing server. Set to empty or leave unset to disallow writing
232
+ // any received dynamic metadata. Receiving of typed metadata is not supported.
233
+ MetadataNamespaces receiving_namespaces = 2 ;
206
234
}
207
235
208
236
// The HeaderForwardingRules structure specifies what headers are
@@ -245,7 +273,7 @@ message ExtProcPerRoute {
245
273
}
246
274
247
275
// Overrides that may be set on a per-route basis
248
- // [#next-free-field: 6 ]
276
+ // [#next-free-field: 7 ]
249
277
message ExtProcOverrides {
250
278
// Set a different processing mode for this route than the default.
251
279
ProcessingMode processing_mode = 1 ;
@@ -266,4 +294,11 @@ message ExtProcOverrides {
266
294
267
295
// Set a different gRPC service for this route than the default.
268
296
config.core.v3.GrpcService grpc_service = 5 ;
297
+
298
+ // Options related to the sending and receiving of dynamic metadata.
299
+ // Lists of forwarding and receiving namespaces will be overridden in their entirety,
300
+ // meaning the most-specific config that specifies this override will be the final
301
+ // config used. It is the prerogative of the control plane to ensure this
302
+ // most-specific config contains the correct final overrides.
303
+ MetadataOptions metadata_options = 6 ;
269
304
}
0 commit comments