From 60f23818dd5dea8a6f5071cb65fae85f5a3f4f19 Mon Sep 17 00:00:00 2001 From: "data-plane-api(Azure Pipelines)" Date: Wed, 24 May 2023 00:36:42 +0000 Subject: [PATCH] upstream: the cluster provoded load balancing policy could be configured as extension (#27512) * upstream: the cluster provoded load balancing policy could be configured as extension Signed-off-by: wbpcode * address comments Signed-off-by: wbpcode --------- Signed-off-by: wbpcode Mirrored from https://github.com/envoyproxy/envoy @ af9b04edc8349ee34fa21ab98b0965f8816f718d --- BUILD | 1 + .../cluster_provided/v3/BUILD | 9 +++++++ .../v3/cluster_provided.proto | 24 +++++++++++++++++++ versioning/BUILD | 1 + 4 files changed, 35 insertions(+) create mode 100644 envoy/extensions/load_balancing_policies/cluster_provided/v3/BUILD create mode 100644 envoy/extensions/load_balancing_policies/cluster_provided/v3/cluster_provided.proto diff --git a/BUILD b/BUILD index 898f318b..cc3a5068 100644 --- a/BUILD +++ b/BUILD @@ -252,6 +252,7 @@ proto_library( "//envoy/extensions/internal_redirect/previous_routes/v3:pkg", "//envoy/extensions/internal_redirect/safe_cross_scheme/v3:pkg", "//envoy/extensions/key_value/file_based/v3:pkg", + "//envoy/extensions/load_balancing_policies/cluster_provided/v3:pkg", "//envoy/extensions/load_balancing_policies/common/v3:pkg", "//envoy/extensions/load_balancing_policies/least_request/v3:pkg", "//envoy/extensions/load_balancing_policies/maglev/v3:pkg", diff --git a/envoy/extensions/load_balancing_policies/cluster_provided/v3/BUILD b/envoy/extensions/load_balancing_policies/cluster_provided/v3/BUILD new file mode 100644 index 00000000..ee92fb65 --- /dev/null +++ b/envoy/extensions/load_balancing_policies/cluster_provided/v3/BUILD @@ -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"], +) diff --git a/envoy/extensions/load_balancing_policies/cluster_provided/v3/cluster_provided.proto b/envoy/extensions/load_balancing_policies/cluster_provided/v3/cluster_provided.proto new file mode 100644 index 00000000..bf12abc6 --- /dev/null +++ b/envoy/extensions/load_balancing_policies/cluster_provided/v3/cluster_provided.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; + +package envoy.extensions.load_balancing_policies.cluster_provided.v3; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.cluster_provided.v3"; +option java_outer_classname = "ClusterProvidedProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/cluster_provided/v3;cluster_providedv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Cluster Provided Load Balancing Policy] +// [#extension: envoy.load_balancing_policies.cluster_provided] + +// The cluster provided load balancing policy allows cluster to specify its own load balancing. +// If this extension is configured, the target cluster must provide load balancer when the cluster +// is created. +// +// ..note:: +// Cluster provided load balancing policy could not be used as sub-policy of other hierarchical +// load balancing policies, such as subset load balancing policy. +message ClusterProvided { +} diff --git a/versioning/BUILD b/versioning/BUILD index ad7aa0d7..4f4a25d6 100644 --- a/versioning/BUILD +++ b/versioning/BUILD @@ -191,6 +191,7 @@ proto_library( "//envoy/extensions/internal_redirect/safe_cross_scheme/v3:pkg", "//envoy/extensions/key_value/file_based/v3:pkg", "//envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3:pkg", + "//envoy/extensions/load_balancing_policies/cluster_provided/v3:pkg", "//envoy/extensions/load_balancing_policies/common/v3:pkg", "//envoy/extensions/load_balancing_policies/least_request/v3:pkg", "//envoy/extensions/load_balancing_policies/maglev/v3:pkg",