filter: add network filters to the upstreams (#7503)

Signed-off-by: Kuat Yessenov <kuat@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ 0f892c2385e7051d325d22b3f603cc60facedd6e
pull/620/head
data-plane-api(CircleCI) 6 years ago
parent 911658451c
commit fbae81c941
  1. 2
      envoy/api/v2/BUILD
  2. 8
      envoy/api/v2/cds.proto
  3. 13
      envoy/api/v2/cluster/BUILD
  4. 30
      envoy/api/v2/cluster/filter.proto

@ -67,6 +67,7 @@ api_proto_library_internal(
":eds", ":eds",
"//envoy/api/v2/auth:cert", "//envoy/api/v2/auth:cert",
"//envoy/api/v2/cluster:circuit_breaker", "//envoy/api/v2/cluster:circuit_breaker",
"//envoy/api/v2/cluster:filter",
"//envoy/api/v2/cluster:outlier_detection", "//envoy/api/v2/cluster:outlier_detection",
"//envoy/api/v2/core:address", "//envoy/api/v2/core:address",
"//envoy/api/v2/core:base", "//envoy/api/v2/core:base",
@ -86,6 +87,7 @@ api_go_grpc_library(
":eds_go_grpc", ":eds_go_grpc",
"//envoy/api/v2/auth:cert_go_proto", "//envoy/api/v2/auth:cert_go_proto",
"//envoy/api/v2/cluster:circuit_breaker_go_proto", "//envoy/api/v2/cluster:circuit_breaker_go_proto",
"//envoy/api/v2/cluster:filter_go_proto",
"//envoy/api/v2/cluster:outlier_detection_go_proto", "//envoy/api/v2/cluster:outlier_detection_go_proto",
"//envoy/api/v2/core:address_go_proto", "//envoy/api/v2/core:address_go_proto",
"//envoy/api/v2/core:base_go_proto", "//envoy/api/v2/core:base_go_proto",

@ -16,6 +16,7 @@ import "envoy/api/v2/discovery.proto";
import "envoy/api/v2/core/health_check.proto"; import "envoy/api/v2/core/health_check.proto";
import "envoy/api/v2/core/protocol.proto"; import "envoy/api/v2/core/protocol.proto";
import "envoy/api/v2/cluster/circuit_breaker.proto"; import "envoy/api/v2/cluster/circuit_breaker.proto";
import "envoy/api/v2/cluster/filter.proto";
import "envoy/api/v2/cluster/outlier_detection.proto"; import "envoy/api/v2/cluster/outlier_detection.proto";
import "envoy/api/v2/eds.proto"; import "envoy/api/v2/eds.proto";
import "envoy/type/percent.proto"; import "envoy/type/percent.proto";
@ -51,7 +52,7 @@ service ClusterDiscoveryService {
// [#protodoc-title: Clusters] // [#protodoc-title: Clusters]
// Configuration for a single upstream cluster. // Configuration for a single upstream cluster.
// [#comment:next free field: 40] // [#comment:next free field: 41]
message Cluster { message Cluster {
// Supplies the name of the cluster which must be unique across all clusters. // Supplies the name of the cluster which must be unique across all clusters.
// The cluster name is used when emitting // The cluster name is used when emitting
@ -632,6 +633,11 @@ message Cluster {
// If this flag is not set to true, Envoy will wait until the hosts fail active health // If this flag is not set to true, Envoy will wait until the hosts fail active health
// checking before removing it from the cluster. // checking before removing it from the cluster.
bool drain_connections_on_host_removal = 32; bool drain_connections_on_host_removal = 32;
// An optional list of network filters that make up the filter chain for
// outgoing connections made by the cluster. Order matters as the filters are
// processed sequentially as connection events happen.
repeated cluster.Filter filters = 40;
} }
// An extensible structure containing the address Envoy should bind to when // An extensible structure containing the address Envoy should bind to when

@ -33,3 +33,16 @@ api_go_proto_library(
name = "outlier_detection", name = "outlier_detection",
proto = ":outlier_detection", proto = ":outlier_detection",
) )
api_proto_library_internal(
name = "filter",
srcs = ["filter.proto"],
visibility = [
"//envoy/api/v2:__pkg__",
],
)
api_go_proto_library(
name = "filter",
proto = ":filter",
)

@ -0,0 +1,30 @@
syntax = "proto3";
package envoy.api.v2.cluster;
option java_outer_classname = "FilterProto";
option java_multiple_files = true;
option java_package = "io.envoyproxy.envoy.api.v2.cluster";
option csharp_namespace = "Envoy.Api.V2.ClusterNS";
option ruby_package = "Envoy.Api.V2.ClusterNS";
import "google/protobuf/any.proto";
import "google/protobuf/struct.proto";
import "validate/validate.proto";
import "gogoproto/gogo.proto";
option (gogoproto.equal_all) = true;
// [#protodoc-title: Upstream filters]
//
// Upstream filters apply to the connections to the upstream cluster hosts.
message Filter {
// The name of the filter to instantiate. The name must match a
// :ref:`supported filter <config_network_filters>`.
string name = 1 [(validate.rules).string.min_bytes = 1];
// Filter specific configuration which depends on the filter being
// instantiated. See the supported filters for further documentation.
google.protobuf.Any typed_config = 2;
}
Loading…
Cancel
Save