You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For each HTTP request, the EPP MUST communicate to the proxy the picked model server endpoint, via
15
-
adding the `x-gateway-destination-endpoint` HTTP header in the request and as an unstructured entry in the [dynamic_metadata](https://github.com/envoyproxy/go-control-plane/blob/c19bf63a811c90bf9e02f8e0dc1dcef94931ebb4/envoy/service/ext_proc/v3/external_processor.pb.go#L320) field of the ext-proc response, or otherwise return an error. The EPP MUST not set two different values in the header and the response metadata.
15
+
adding the `x-gateway-destination-endpoint` HTTP header in the request and as an unstructured entry in the [dynamic_metadata](https://github.com/envoyproxy/go-control-plane/blob/c19bf63a811c90bf9e02f8e0dc1dcef94931ebb4/envoy/service/ext_proc/v3/external_processor.pb.go#L320) field of the ext-proc response, or otherwise return an error. The metadata entry for the picked endpoint MUST be wrapped with an outer key named `gateway-destination-endpoint.dynamic_forwarding.selected_endpoints`.
16
+
17
+
The EPP MUST not set two different values in the header and the response metadata.
16
18
Setting different value leads to unpredictable behavior because proxies aren't guaranteed to support both paths, and so this protocol does not define what takes precedence.
Copy file name to clipboardExpand all lines: pkg/epp/server/runserver.go
+11-8
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,7 @@ import (
46
46
// ExtProcServerRunner provides methods to manage an external process server.
47
47
typeExtProcServerRunnerstruct {
48
48
GrpcPortint
49
+
TargetEndpointOuterMetadataKeystring
49
50
TargetEndpointKeystring
50
51
PoolNamestring
51
52
PoolNamespacestring
@@ -59,19 +60,21 @@ type ExtProcServerRunner struct {
59
60
60
61
// Default values for CLI flags in main
61
62
const (
62
-
DefaultGrpcPort=9002// default for --grpcPort
63
-
DefaultTargetEndpointKey="x-gateway-destination-endpoint"// default for --targetEndpointKey
64
-
DefaultPoolName=""// required but no default
65
-
DefaultPoolNamespace="default"// default for --poolNamespace
66
-
DefaultRefreshMetricsInterval=50*time.Millisecond// default for --refreshMetricsInterval
67
-
DefaultRefreshPrometheusMetricsInterval=5*time.Second// default for --refreshPrometheusMetricsInterval
68
-
DefaultSecureServing=true// default for --secureServing
63
+
DefaultGrpcPort=9002// default for --grpcPort
64
+
DefaultTargetEndpointOuterMetadataKey="gateway-destination-endpoint.dynamic_forwarding.selected_endpoints"// default for --targetEndpointOuterMetadataKey
65
+
DefaultTargetEndpointKey="x-gateway-destination-endpoint"// default for --targetEndpointKey
66
+
DefaultPoolName=""// required but no default
67
+
DefaultPoolNamespace="default"// default for --poolNamespace
68
+
DefaultRefreshMetricsInterval=50*time.Millisecond// default for --refreshMetricsInterval
69
+
DefaultRefreshPrometheusMetricsInterval=5*time.Second// default for --refreshPrometheusMetricsInterval
70
+
DefaultSecureServing=true// default for --secureServing
0 commit comments