Skip to content
Merged
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
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ extensions/filters/http/oauth2 @derekargueta @snowp
/*/extensions/clusters/original_dst @UNOWNED @UNOWNED
/*/extensions/clusters/logical_dns/ @UNOWNED @UNOWNED
/*/extensions/clusters/common/ @UNOWNED @UNOWNED
/*/extensions/clusters/eds/ @UNOWNED @UNOWNED

# URL Pattern Match and Rewrite Library
/*/extensions/path/uri_template_lib @alyssawilk @yanjunxiang-google
Expand Down
4 changes: 2 additions & 2 deletions changelogs/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ behavior_changes:
this kind of update will be rejected. The runtime flag ``envoy.reloadable_features.enable_update_listener_socket_options`` can be used for revert this behavior.
- area: build
change: |
moved the strict_dns, original_dst, and logical_dns clusters to extensions. If you use these clusters and override extensions_build_config.bzl you will now need to include it explicitly.
moved the static, strict_dns and original_dst clusters to extensions. If you use these clusters and override extensions_build_config.bzl you will now need to include it explicitly.
moved the strict_dns, original_dst, logical_dns, static, and eds clusters to extensions. If you use these clusters and override extensions_build_config.bzl you will now need to include it explicitly.

minor_behavior_changes:
# *Changes that may cause incompatibilities for some users, but should not for most*
- area: cache_filter
Expand Down
3 changes: 2 additions & 1 deletion docs/root/intro/arch_overview/upstream/service_discovery.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ When using the original destination cluster for HTTP upstreams, please set :ref:
.. _arch_overview_service_discovery_types_eds:

Endpoint discovery service (EDS)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. _extension_envoy.clusters.eds:

The *endpoint discovery service* is a :ref:`xDS management server based on gRPC or REST-JSON API server
<config_overview_management_server>` used by Envoy to fetch cluster members. The cluster members are called
Expand Down
62 changes: 1 addition & 61 deletions source/common/upstream/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ load(
"envoy_package",
"envoy_select_enable_http3",
)
load(
"@envoy_build_config//:extensions_build_config.bzl",
"LEGACY_ALWAYSLINK",
)

licenses(["notice"]) # Apache 2

Expand Down Expand Up @@ -405,62 +401,6 @@ envoy_cc_library(
],
)

envoy_cc_library(
name = "eds_lib",
srcs = ["eds.cc"],
hdrs = ["eds.h"],
deps = [
":cluster_factory_lib",
":leds_lib",
":upstream_includes",
"//envoy/config:grpc_mux_interface",
"//envoy/config:subscription_factory_interface",
"//envoy/config:subscription_interface",
"//envoy/local_info:local_info_interface",
"//envoy/secret:secret_manager_interface",
"//envoy/upstream:cluster_factory_interface",
"//envoy/upstream:locality_lib",
"//source/common/config:api_version_lib",
"//source/common/config:decoded_resource_lib",
"//source/common/config:metadata_lib",
"//source/common/config:subscription_base_interface",
"//source/common/config:subscription_factory_lib",
"//source/common/config:utility_lib",
"//source/common/network:address_lib",
"//source/common/network:resolver_lib",
"//source/common/network:utility_lib",
"//source/common/protobuf:utility_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
],
alwayslink = LEGACY_ALWAYSLINK,
)

envoy_cc_library(
name = "leds_lib",
srcs = ["leds.cc"],
hdrs = ["leds.h"],
deps = [
":upstream_includes",
"//envoy/config:grpc_mux_interface",
"//envoy/config:subscription_factory_interface",
"//envoy/config:subscription_interface",
"//envoy/local_info:local_info_interface",
"//source/common/config:decoded_resource_lib",
"//source/common/config:subscription_base_interface",
"//source/common/config:subscription_factory_lib",
"//source/common/config:utility_lib",
"//source/common/network:address_lib",
"//source/common/network:resolver_lib",
"//source/common/network:utility_lib",
"//source/common/protobuf:utility_lib",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",
],
)

envoy_cc_library(
name = "subset_lb_lib",
srcs = ["subset_lb.cc"],
Expand All @@ -486,7 +426,7 @@ envoy_cc_library(
name = "upstream_lib",
srcs = ["upstream_impl.cc"],
deps = [
":eds_lib",
":cluster_factory_lib",
":health_checker_lib",
# TODO(mattklein123): Move the clusters to extensions so they can be compiled out.
":upstream_includes",
Expand Down
1 change: 0 additions & 1 deletion source/common/upstream/upstream_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#include "source/common/runtime/runtime_features.h"
#include "source/common/runtime/runtime_impl.h"
#include "source/common/upstream/cluster_factory_impl.h"
#include "source/common/upstream/eds.h"
#include "source/common/upstream/health_checker_impl.h"
#include "source/extensions/filters/network/http_connection_manager/config.h"
#include "source/server/transport_socket_config_impl.h"
Expand Down
66 changes: 66 additions & 0 deletions source/extensions/clusters/eds/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
load(
"//bazel:envoy_build_system.bzl",
"envoy_cc_extension",
"envoy_cc_library",
"envoy_extension_package",
)

licenses(["notice"]) # Apache 2

envoy_extension_package()

envoy_cc_extension(
name = "eds_lib",
srcs = ["eds.cc"],
hdrs = ["eds.h"],
visibility = ["//visibility:public"],
deps = [
"leds_lib",
"//envoy/config:grpc_mux_interface",
"//envoy/config:subscription_factory_interface",
"//envoy/config:subscription_interface",
"//envoy/local_info:local_info_interface",
"//envoy/secret:secret_manager_interface",
"//envoy/upstream:cluster_factory_interface",
"//envoy/upstream:locality_lib",
"//source/common/config:api_version_lib",
"//source/common/config:decoded_resource_lib",
"//source/common/config:metadata_lib",
"//source/common/config:subscription_base_interface",
"//source/common/config:subscription_factory_lib",
"//source/common/config:utility_lib",
"//source/common/network:address_lib",
"//source/common/network:resolver_lib",
"//source/common/network:utility_lib",
"//source/common/protobuf:utility_lib",
"//source/common/upstream:cluster_factory_lib",
"//source/common/upstream:upstream_includes",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
],
)

envoy_cc_library(
name = "leds_lib",
srcs = ["leds.cc"],
hdrs = ["leds.h"],
deps = [
"//envoy/config:grpc_mux_interface",
"//envoy/config:subscription_factory_interface",
"//envoy/config:subscription_interface",
"//envoy/local_info:local_info_interface",
"//source/common/config:decoded_resource_lib",
"//source/common/config:subscription_base_interface",
"//source/common/config:subscription_factory_lib",
"//source/common/config:utility_lib",
"//source/common/network:address_lib",
"//source/common/network:resolver_lib",
"//source/common/network:utility_lib",
"//source/common/protobuf:utility_lib",
"//source/common/upstream:upstream_includes",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",
],
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "source/common/upstream/eds.h"
#include "source/extensions/clusters/eds/eds.h"

#include "envoy/common/exception.h"
#include "envoy/config/cluster/v3/cluster.pb.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

#include "source/common/config/subscription_base.h"
#include "source/common/upstream/cluster_factory_impl.h"
#include "source/common/upstream/leds.h"
#include "source/common/upstream/upstream_impl.h"
#include "source/extensions/clusters/eds/leds.h"

namespace Envoy {
namespace Upstream {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "source/common/upstream/leds.h"
#include "source/extensions/clusters/eds/leds.h"

#include "envoy/common/exception.h"
#include "envoy/config/core/v3/config_source.pb.h"
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions source/extensions/extensions_build_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ EXTENSIONS = {

"envoy.clusters.aggregate": "//source/extensions/clusters/aggregate:cluster",
"envoy.clusters.dynamic_forward_proxy": "//source/extensions/clusters/dynamic_forward_proxy:cluster",
"envoy.clusters.eds": "//source/extensions/clusters/eds:eds_lib",
"envoy.clusters.redis": "//source/extensions/clusters/redis:redis_cluster",
"envoy.clusters.static": "//source/extensions/clusters/static:static_cluster_lib",
"envoy.clusters.strict_dns": "//source/extensions/clusters/strict_dns:strict_dns_cluster_lib",
Expand Down
5 changes: 5 additions & 0 deletions source/extensions/extensions_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ envoy.clusters.original_dst:
- envoy.clusters
security_posture: robust_to_untrusted_downstream_and_upstream
status: stable
envoy.clusters.eds:
categories:
- envoy.clusters
security_posture: robust_to_untrusted_downstream_and_upstream
status: stable
envoy.clusters.redis:
categories:
- envoy.clusters
Expand Down
91 changes: 1 addition & 90 deletions test/common/upstream/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ envoy_cc_test(
":test_cluster_manager",
"//source/common/router:context_lib",
"//source/common/upstream:load_balancer_factory_base_lib",
"//source/extensions/clusters/eds:eds_lib",
"//source/extensions/clusters/logical_dns:logical_dns_cluster_lib",
"//source/extensions/clusters/original_dst:original_dst_cluster_lib",
"//source/extensions/clusters/static:static_cluster_lib",
Expand Down Expand Up @@ -137,96 +138,6 @@ envoy_cc_test(
deps = ["//source/common/upstream:scheduler_lib"],
)

envoy_cc_test(
name = "eds_test",
srcs = ["eds_test.cc"],
deps = [
":utility_lib",
"//source/common/config:utility_lib",
"//source/common/upstream:eds_lib",
"//source/extensions/transport_sockets/raw_buffer:config",
"//source/extensions/transport_sockets/tls:config",
"//source/server:transport_socket_config_lib",
"//test/common/stats:stat_test_utility_lib",
"//test/integration/load_balancers:custom_lb_policy",
"//test/mocks/local_info:local_info_mocks",
"//test/mocks/protobuf:protobuf_mocks",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/server:admin_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/mocks/upstream:cluster_manager_mocks",
"//test/mocks/upstream:health_checker_mocks",
"//test/test_common:test_runtime_lib",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
],
)

envoy_cc_benchmark_binary(
name = "eds_speed_test",
srcs = ["eds_speed_test.cc"],
external_deps = [
"benchmark",
],
deps = [
":utility_lib",
"//envoy/config:xds_resources_delegate_interface",
"//source/common/config:grpc_mux_lib",
"//source/common/config:grpc_subscription_lib",
"//source/common/config:protobuf_link_hacks",
"//source/common/config:utility_lib",
"//source/common/config/xds_mux:grpc_mux_lib",
"//source/common/upstream:eds_lib",
"//source/extensions/transport_sockets/raw_buffer:config",
"//source/server:transport_socket_config_lib",
"//test/mocks/config:custom_config_validators_mocks",
"//test/mocks/local_info:local_info_mocks",
"//test/mocks/protobuf:protobuf_mocks",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/server:admin_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/mocks/upstream:cluster_manager_mocks",
"//test/test_common:test_runtime_lib",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
],
)

envoy_benchmark_test(
name = "eds_speed_test_benchmark_test",
benchmark_binary = "eds_speed_test",
)

envoy_cc_test(
name = "leds_test",
srcs = ["leds_test.cc"],
deps = [
":utility_lib",
"//source/common/config:utility_lib",
"//source/common/upstream:leds_lib",
"//source/extensions/transport_sockets/raw_buffer:config",
"//source/server:transport_socket_config_lib",
"//test/common/stats:stat_test_utility_lib",
"//test/mocks/local_info:local_info_mocks",
"//test/mocks/protobuf:protobuf_mocks",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/server:admin_mocks",
"//test/mocks/server:instance_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/mocks/upstream:cluster_manager_mocks",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",
],
)

envoy_cc_test_library(
name = "health_check_fuzz_utils_lib",
srcs = [
Expand Down
Loading