Skip to content

Commit c188680

Browse files
reverse_tunnels: Add in support for the reverse tunnel reporting by adding hook points and interface for the reporter (#42647)
## Commit Message Add in support for the reverse tunnel reporting by adding hook points and interface for the reporter ## Additional Description Adds an interface for reporters to extend to report the reverse tunnels. Also added in the hooks needed on the extension, socket manager and the filter to report the tunnels with the context to report to the reporter (configured using yaml). We are reporting the tenant_id on connections because we have plans to possibly use them for validation later on in the request lifecycle. This data isnt available at the upstream_socket_manager hence we dont report the tenant_id on disconnection Also added tests for the exercised new code paths. Signed-off-by: aakugan <[email protected]> Mirrored from https://github.com/envoyproxy/envoy @ 3fc850ad47b56545fdb20b3b987c53050cdb8fd9
1 parent 2fd335d commit c188680

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

envoy/extensions/bootstrap/reverse_tunnel/upstream_socket_interface/v3/BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
55
licenses(["notice"]) # Apache 2
66

77
api_proto_package(
8-
deps = ["@com_github_cncf_xds//udpa/annotations:pkg"],
8+
deps = [
9+
"//envoy/config/core/v3:pkg",
10+
"@com_github_cncf_xds//udpa/annotations:pkg",
11+
],
912
)

envoy/extensions/bootstrap/reverse_tunnel/upstream_socket_interface/v3/upstream_reverse_connection_socket_interface.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ syntax = "proto3";
22

33
package envoy.extensions.bootstrap.reverse_tunnel.upstream_socket_interface.v3;
44

5+
import "envoy/config/core/v3/extension.proto";
6+
57
import "google/protobuf/wrappers.proto";
68

79
import "udpa/annotations/status.proto";
@@ -29,4 +31,9 @@ message UpstreamReverseConnectionSocketInterface {
2931
// When enabled, emits hidden statistics for individual nodes and clusters.
3032
// Defaults to false.
3133
bool enable_detailed_stats = 3;
34+
35+
// Optional configuration for a tunnel reporting extension. When provided,
36+
// the socket interface instantiates a reporter via the configured factory.
37+
// If unset, no reporting is done.
38+
config.core.v3.TypedExtensionConfig reporter_config = 4;
3239
}

0 commit comments

Comments
 (0)