Skip to content

Commit

Permalink
tds: bootstrap and API configuration protos. (#7105)
Browse files Browse the repository at this point in the history
This PR provides the TDS API config. The implementation and docs will be
added in a followup, the idea is to unblock some projects that depend on
the details here.

Risk level: Low
Testing: @envoy_api build

Part of #6708

Signed-off-by: Harvey Tuch <htuch@google.com>
  • Loading branch information
htuch authored May 30, 2019
1 parent f326331 commit ad2cacc
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 0 deletions.
11 changes: 11 additions & 0 deletions api/envoy/config/bootstrap/v2/bootstrap.proto
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,15 @@ message RuntimeLayer {
message AdminLayer {
}

// [#not-implemented-hide:]
message TdsLayer {
// Resource to subscribe to at *tds_config* for the TDS layer.
string name = 1;

// TDS configuration source.
envoy.api.v2.core.ConfigSource tds_config = 2;
}

// Descriptive name for the runtime layer. This is only used for the runtime
// :http:get:`/runtime` output.
string name = 1;
Expand All @@ -274,6 +283,8 @@ message RuntimeLayer {
google.protobuf.Struct static_layer = 2;
DiskLayer disk_layer = 3;
AdminLayer admin_layer = 4;
// [#not-implemented-hide:]
TdsLayer tds_layer = 5;
}
}

Expand Down
17 changes: 17 additions & 0 deletions api/envoy/service/discovery/v2/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,20 @@ api_go_grpc_library(
"//envoy/api/v2:discovery_go_proto",
],
)

api_proto_library_internal(
name = "tds",
srcs = ["tds.proto"],
has_services = 1,
deps = [
"//envoy/api/v2:discovery",
],
)

api_go_grpc_library(
name = "tds",
proto = ":tds",
deps = [
"//envoy/api/v2:discovery_go_proto",
],
)
34 changes: 34 additions & 0 deletions api/envoy/service/discovery/v2/tds.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
syntax = "proto3";

package envoy.service.discovery.v2;

option java_outer_classname = "TdsProto";
option java_multiple_files = true;
option java_package = "io.envoyproxy.envoy.service.discovery.v2";
option java_generic_services = true;

import "envoy/api/v2/discovery.proto";

import "google/api/annotations.proto";
import "google/protobuf/struct.proto";

// Discovery service for Runtime resources.
// [#not-implemented-hide:]
service RuntimeDiscoveryService {
rpc StreamRuntime(stream envoy.api.v2.DiscoveryRequest)
returns (stream envoy.api.v2.DiscoveryResponse) {
}

rpc FetchRuntime(envoy.api.v2.DiscoveryRequest) returns (envoy.api.v2.DiscoveryResponse) {
option (google.api.http) = {
post: "/v2/discovery:runtime"
body: "*"
};
}
}

// TDS resource type. This describes a layer in the runtime virtual filesystem.
// [#not-implemented-hide:]
message Runtime {
google.protobuf.Struct layer = 1;
}
1 change: 1 addition & 0 deletions api/test/build/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ api_cc_test(
"//envoy/service/accesslog/v2:als",
"//envoy/service/discovery/v2:ads",
"//envoy/service/discovery/v2:hds",
"//envoy/service/discovery/v2:tds",
"//envoy/service/metrics/v2:metrics_service",
"//envoy/service/ratelimit/v2:rls",
],
Expand Down
2 changes: 2 additions & 0 deletions api/test/build/build_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ int main(int argc, char* argv[]) {
"envoy.service.discovery.v2.AggregatedDiscoveryService.StreamAggregatedResources",
"envoy.service.discovery.v2.HealthDiscoveryService.FetchHealthCheck",
"envoy.service.discovery.v2.HealthDiscoveryService.StreamHealthCheck",
"envoy.service.discovery.v2.RuntimeDiscoveryService.FetchRuntime",
"envoy.service.discovery.v2.RuntimeDiscoveryService.StreamRuntime",
"envoy.service.accesslog.v2.AccessLogService.StreamAccessLogs",
"envoy.service.metrics.v2.MetricsService.StreamMetrics",
"envoy.service.ratelimit.v2.RateLimitService.ShouldRateLimit",
Expand Down
1 change: 1 addition & 0 deletions source/server/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ envoy_cc_library(
"@envoy_api//envoy/api/v2:rds_cc",
"@envoy_api//envoy/service/discovery/v2:ads_cc",
"@envoy_api//envoy/service/discovery/v2:hds_cc",
"@envoy_api//envoy/service/discovery/v2:tds_cc",
"@envoy_api//envoy/service/ratelimit/v2:rls_cc",
],
)
Expand Down
2 changes: 2 additions & 0 deletions source/server/proto_descriptors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ void validateProtoDescriptors() {
"envoy.service.discovery.v2.AggregatedDiscoveryService.StreamAggregatedResources",
"envoy.service.discovery.v2.HealthDiscoveryService.FetchHealthCheck",
"envoy.service.discovery.v2.HealthDiscoveryService.StreamHealthCheck",
"envoy.service.discovery.v2.RuntimeDiscoveryService.FetchRuntime",
"envoy.service.discovery.v2.RuntimeDiscoveryService.StreamRuntime",
"envoy.service.ratelimit.v2.RateLimitService.ShouldRateLimit",
};

Expand Down

0 comments on commit ad2cacc

Please sign in to comment.