Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.

load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")

licenses(["notice"]) # Apache 2

api_proto_package(
deps = [
"@envoy_api//envoy/config/core/v3:pkg",
"@envoy_api//envoy/config/route/v3:pkg",
"@envoy_api//envoy/type/matcher/v3:pkg",
"@envoy_api//envoy/type/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Protocol buffer definitions for the MetaProtocol route configuration.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
syntax = "proto3";

package aeraki.meta_protocol_proxy.config.route.v1alpha;

import "envoy/config/route/v3/route_components.proto";

import "udpa/annotations/status.proto";
import "validate/validate.proto";

option java_package = "io.envoyproxy.envoy.extensions.filters.network.meta_protocol_proxy.config.route.v1alpha";
option java_outer_classname = "MetaRouteConfigurationProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: Meta Protocol Proxy Route Configuration]
// Meta Protocol proxy :ref:`configuration overview <config_meta_protocol_proxy>`.

// [#next-free-field: 3]
message RouteConfiguration {
//The name of the route configuration. For example, it might match route_config_name in envoy.extensions.filters.network.meta_protocol_proxy.v1alpha.Rds.
string name = 1;

// The list of routes that will be matched, in order, against incoming requests. The first route
// that matches will be used.
repeated Route routes = 2;
}

message Route {
// Name for the route.
string name = 1;

// Route matching parameters.
RouteMatch match = 2;

// Route request to some upstream cluster.
RouteAction route = 3 [(validate.rules).message = {required: true}];
}

message RouteMatch {
// Specifies a set of key:value pairs in th metadata that the route should match on. The router will check the metadata
// populated by the codec plugin against all the specified key:value pairs in the route config. A match will happen if all the
// key:value pairs in the route are present in the request metadata with the same values (or based on presence if
// the value field is not in the config).
repeated envoy.config.route.v3.HeaderMatcher metadata = 1;
}

message RouteAction {
oneof cluster_specifier {
option (validate.required) = true;

// Indicates the upstream cluster to which the request should be routed.
string cluster = 1;

// Multiple upstream clusters can be specified for a given route. The
// request is routed to one of the upstream clusters based on weights
// assigned to each cluster.
// Currently ClusterWeight only supports the name and weight fields.
envoy.config.route.v3.WeightedCluster weighted_clusters = 2;
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.

load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")

licenses(["notice"]) # Apache 2

api_proto_package(
deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Protocol buffer definitions for the MetaProtocol router.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
syntax = "proto3";

package aeraki.meta_protocol_proxy.filters.router.v1alpha;

import "udpa/annotations/status.proto";

option java_package = "io.envoyproxy.envoy.extensions.filters.network.meta_protocol_proxy.router.v1alpha";
option java_outer_classname = "RouterProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: Router]
// MetaProtocol router :ref:`configuration overview <config_meta_protocol_filters_router>`.

message Router {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.

load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")

licenses(["notice"]) # Apache 2

api_proto_package(
deps = [
"//api/meta_protocol_proxy/config/route/v1alpha:pkg",
"@envoy_api//envoy/config/core/v3:pkg",
"@envoy_api//envoy/config/route/v3:pkg",
"@envoy_api//envoy/type/matcher/v3:pkg",
"@envoy_api//envoy/type/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Protocol buffer definitions for the MetaProtocol proxy.
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
syntax = "proto3";

package aeraki.meta_protocol_proxy.v1alpha;

import "envoy/config/core/v3/config_source.proto";

import "envoy/extensions/filters/network/meta_protocol_proxy/config/route/v1alpha/route.proto";

import "google/protobuf/any.proto";

import "udpa/annotations/status.proto";
import "validate/validate.proto";

option java_package = "io.envoyproxy.envoy.extensions.filters.network.meta_protocol_proxy.v1alpha";
option java_outer_classname = "MetaProtocolProxyProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: Meta Protocol proxy]
// Meta Protocol proxy :ref:`configuration overview <config_meta_protocol_proxy>`.
// [#extension: envoy.filters.network.meta_protocol_proxy]

// [#next-free-field: 7]
message MetaProtocolProxy {

// The human readable prefix to use when emitting statistics.
string stat_prefix = 1 [(validate.rules).string = {min_len: 1}];

// The name of the application protocol built on top of meta protocol.
string application_protocol = 2 [(validate.rules).string = {min_len: 1}];

oneof route_specifier {
option (validate.required) = true;

// The meta protocol proxy’s route table will be dynamically loaded via the RDS API.
Rds rds = 3;

// The route table for the meta protocol proxy is static and is specified in this property.
config.route.v1alpha.RouteConfiguration route_config = 4;
}

// The codec which encodes and decodes the application protocol.
Codec codec = 5;

// A list of individual Layer-7 filters that make up the filter chain for requests made to
// the meta protocol proxy. Order matters as the filters are processed sequentially as
// request events happen. If no meta_protocol_filters are specified, a default router filter
// (`aeraki.meta_protocol.filters.router`) is used.
repeated MetaProtocolFilter meta_protocol_filters = 6;
}

message Rds {
// Configuration source specifier for RDS.
envoy.config.core.v3.ConfigSource config_source = 1 [(validate.rules).message = {required: true}];

// The name of the route configuration. This name will be passed to the RDS
// API. This allows an Envoy configuration with multiple HTTP listeners (and
// associated HTTP connection manager filters) to use different route
// configurations.
string route_config_name = 2;
}

// MetaProtocolFilter configures a MetaProtocol filter.
message MetaProtocolFilter {
// The name of the filter to instantiate. The name must match a supported filter.
string name = 1 [(validate.rules).string = {min_len: 1}];

// Filter specific configuration which depends on the filter being
// instantiated. See the supported filters for further documentation.
google.protobuf.Any config = 2;
}

message Codec {
// The name of the codec configuration.
string name = 1 [(validate.rules).string = {min_len: 1}];

// Codec specific configuration which depends on the codec being instantiated.
google.protobuf.Any config = 2;
}