-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support path exposed with non-HTTP2 protocol
If a proxied service is a gRPC or HTTP2 service, but a path is exposed using the HTTP1 or TCP protocol, Envoy should not be configured with `http2ProtocolOptions` for the cluster backing the path. A situation where this comes up is a gRPC service whose healthcheck or metrics route (e.g. for Prometheus) is an HTTP1 service running on a different port. Previously, if these were exposed either using `Expose: { Checks: true }` or `Expose: { Paths: ... }`, Envoy would still be configured to communicate with the path over HTTP2, which would not work properly.
- Loading branch information
Showing
4 changed files
with
99 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
agent/xds/testdata/clusters/expose-paths-grpc-new-cluster-http1.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"versionInfo": "00000001", | ||
"resources": [ | ||
{ | ||
"@type": "type.googleapis.com/envoy.api.v2.Cluster", | ||
"name": "exposed_cluster_8090", | ||
"type": "STATIC", | ||
"connectTimeout": "5s", | ||
"loadAssignment": { | ||
"clusterName": "exposed_cluster_8090", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "127.0.0.1", | ||
"portValue": 8090 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"@type": "type.googleapis.com/envoy.api.v2.Cluster", | ||
"name": "local_app", | ||
"type": "STATIC", | ||
"connectTimeout": "5s", | ||
"loadAssignment": { | ||
"clusterName": "local_app", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "127.0.0.1", | ||
"portValue": 8080 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"http2ProtocolOptions": { | ||
|
||
} | ||
} | ||
], | ||
"typeUrl": "type.googleapis.com/envoy.api.v2.Cluster", | ||
"nonce": "00000001" | ||
} |