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 @@ -279,6 +279,7 @@ extensions/filters/http/oauth2 @derekargueta @snowp
/*/extensions/filters/common @UNOWNED @UNOWNED
/*/extensions/filters/http/common @UNOWNED @UNOWNED
/*/extensions/filters/network/common @UNOWNED @UNOWNED
/*/extensions/clusters/static @UNOWNED @UNOWNED
/*/extensions/clusters/strict_dns @UNOWNED @UNOWNED
/*/extensions/clusters/original_dst @UNOWNED @UNOWNED
/*/extensions/clusters/logical_dns/ @UNOWNED @UNOWNED
Expand Down
1 change: 1 addition & 0 deletions changelogs/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ behavior_changes:
- 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.

minor_behavior_changes:
# *Changes that may cause incompatibilities for some users, but should not for most*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Supported service discovery types

Static
^^^^^^
.. _extension_envoy.clusters.static:

Static is the simplest service discovery type. The configuration explicitly specifies the resolved
network name (IP address/port, unix domain socket, etc.) of each upstream host.
Expand Down
14 changes: 0 additions & 14 deletions source/common/upstream/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,6 @@ envoy_cc_library(
":eds_lib",
":health_checker_lib",
# TODO(mattklein123): Move the clusters to extensions so they can be compiled out.
":static_cluster_lib",
":upstream_includes",
":transport_socket_match_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
Expand Down Expand Up @@ -533,19 +532,6 @@ envoy_cc_library(
],
)

envoy_cc_library(
name = "static_cluster_lib",
srcs = ["static_cluster.cc"],
hdrs = ["static_cluster.h"],
deps = [
":cluster_factory_includes",
":upstream_includes",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
"@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",
],
alwayslink = LEGACY_ALWAYSLINK,
)

envoy_cc_library(
name = "upstream_includes",
hdrs = [
Expand Down
22 changes: 22 additions & 0 deletions source/extensions/clusters/static/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
load(
"//bazel:envoy_build_system.bzl",
"envoy_cc_extension",
"envoy_extension_package",
)

licenses(["notice"]) # Apache 2

envoy_extension_package()

envoy_cc_extension(
name = "static_cluster_lib",
srcs = ["static_cluster.cc"],
hdrs = ["static_cluster.h"],
visibility = ["//visibility:public"],
deps = [
"//source/common/upstream:cluster_factory_includes",
"//source/common/upstream:upstream_includes",
"@envoy_api//envoy/config/cluster/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/static_cluster.h"
#include "source/extensions/clusters/static/static_cluster.h"

#include "envoy/common/exception.h"
#include "envoy/config/cluster/v3/cluster.pb.h"
Expand Down
3 changes: 2 additions & 1 deletion source/extensions/extensions_build_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ EXTENSIONS = {
"envoy.clusters.aggregate": "//source/extensions/clusters/aggregate:cluster",
"envoy.clusters.dynamic_forward_proxy": "//source/extensions/clusters/dynamic_forward_proxy:cluster",
"envoy.clusters.redis": "//source/extensions/clusters/redis:redis_cluster",
"envoy.clusters.strict_dns": "//source/extensions/clusters/strict_dns:strict_dns_cluster_lib",
"envoy.clusters.static": "//source/extensions/clusters/static:static_cluster_lib",
"envoy.clusters.strict_dns": "//source/extensions/clusters/strict_dns:strict_dns_cluster_lib",
"envoy.clusters.original_dst": "//source/extensions/clusters/original_dst:original_dst_cluster_lib",
"envoy.clusters.logical_dns": "//source/extensions/clusters/logical_dns:logical_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 @@ -85,6 +85,11 @@ envoy.clusters.dynamic_forward_proxy:
- envoy.clusters
security_posture: robust_to_untrusted_downstream
status: stable
envoy.clusters.static:
categories:
- envoy.clusters
security_posture: robust_to_untrusted_downstream_and_upstream
status: stable
envoy.clusters.strict_dns:
categories:
- envoy.clusters
Expand Down
3 changes: 2 additions & 1 deletion test/common/upstream/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ envoy_cc_test(
"//source/common/upstream:load_balancer_factory_base_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",
"//source/extensions/clusters/strict_dns:strict_dns_cluster_lib",
"//source/extensions/network/dns_resolver/cares:config",
"//source/extensions/transport_sockets/tls:config",
Expand Down Expand Up @@ -637,7 +638,7 @@ envoy_cc_test(
"//source/common/network:address_lib",
"//source/common/network:utility_lib",
# TODO(mattklein123): Split this into 2 tests for each cluster.
"//source/common/upstream:static_cluster_lib",
"//source/extensions/clusters/static:static_cluster_lib",
"//source/extensions/clusters/strict_dns:strict_dns_cluster_lib",
"//source/extensions/transport_sockets/raw_buffer:config",
"//source/extensions/transport_sockets/tls:config",
Expand Down
2 changes: 1 addition & 1 deletion test/common/upstream/upstream_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "source/common/network/transport_socket_options_impl.h"
#include "source/common/network/utility.h"
#include "source/common/singleton/manager_impl.h"
#include "source/common/upstream/static_cluster.h"
#include "source/extensions/clusters/static/static_cluster.h"
#include "source/extensions/clusters/strict_dns/strict_dns_cluster.h"
#include "source/server/transport_socket_config_impl.h"

Expand Down
1 change: 1 addition & 0 deletions test/extensions/clusters/aggregate/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ envoy_extension_cc_test(
"//source/common/upstream:cluster_factory_lib",
"//source/common/upstream:cluster_manager_lib",
"//source/extensions/clusters/aggregate:cluster",
"//source/extensions/clusters/static:static_cluster_lib",
"//source/extensions/transport_sockets/raw_buffer:config",
"//test/common/upstream:test_cluster_manager",
"//test/common/upstream:utility_lib",
Expand Down
2 changes: 2 additions & 0 deletions test/integration/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ envoy_cc_test_binary(
deps = [
"//source/exe:envoy_main_common_with_core_extensions_lib",
"//source/exe:platform_impl_lib",
"//source/extensions/clusters/static:static_cluster_lib",
"//source/extensions/clusters/strict_dns:strict_dns_cluster_lib",
],
)
Expand Down Expand Up @@ -874,6 +875,7 @@ envoy_cc_test_library(
"//source/common/common:thread_lib",
"//source/common/config:api_version_lib",
"//source/extensions/network/dns_resolver/cares:config",
"//source/extensions/clusters/static:static_cluster_lib",
"//source/extensions/transport_sockets/tls:context_config_lib",
"//source/extensions/transport_sockets/tls:context_lib",
"//source/extensions/transport_sockets/tls:ssl_socket_lib",
Expand Down
1 change: 1 addition & 0 deletions test/server/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ envoy_cc_test(
"//source/common/http:context_lib",
"//source/common/upstream:cluster_manager_lib",
"//source/extensions/access_loggers/file:config",
"//source/extensions/clusters/static:static_cluster_lib",
"//source/extensions/stat_sinks/statsd:config",
"//source/extensions/transport_sockets/raw_buffer:config",
"//source/server:configuration_lib",
Expand Down
1 change: 1 addition & 0 deletions tools/code_format/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ unsorted_flags:
# PLEASE DO NOT ADD FILES TO THIS LIST WITHOUT SENIOR MAINTAINER APPROVAL
visibility_excludes:
- source/extensions/clusters/strict_dns/
- source/extensions/clusters/static/
- source/extensions/clusters/original_dst/
- source/extensions/clusters/logical_dns/
- source/extensions/early_data/BUILD
Expand Down