Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Jin Xuan <[email protected]>
  • Loading branch information
Stevenjin8 committed Oct 11, 2024
1 parent 8915b81 commit 2464e2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
18 changes: 8 additions & 10 deletions api/envoy/config/cluster/v3/cluster.proto
Original file line number Diff line number Diff line change
Expand Up @@ -953,8 +953,8 @@ message Cluster {
// :ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`
// and :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
// This field is deprecated in favor of ``dns_config``
// which aggregates all of the DNS configuration in a single message.
// This field is deprecated in favor of :ref:`cluster_type<envoy_v3_api_enum_value_config.cluster.v3.Cluster.cluster_type>` and
// will be ignored :ref:`cluster_type<envoy_v3_api_enum_value_config.cluster.v3.Cluster.cluster_type>` is set.
google.protobuf.Duration dns_refresh_rate = 16 [
deprecated = true,
(validate.rules).duration = {gt {nanos: 1000000}},
Expand All @@ -970,8 +970,8 @@ message Cluster {
// :ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`
// and :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
// This field is deprecated in favor of ``dns_config``
// which aggregates all of the DNS configuration in a single message.
// This field is deprecated in favor of :ref:`cluster_type<envoy_v3_api_enum_value_config.cluster.v3.Cluster.cluster_type>` and
// will be ignored :ref:`cluster_type<envoy_v3_api_enum_value_config.cluster.v3.Cluster.cluster_type>` is set.
google.protobuf.Duration dns_jitter = 58
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

Expand All @@ -983,16 +983,16 @@ message Cluster {
// other than :ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>` and
// :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>` this setting is
// ignored.
// This field is deprecated in favor of ``dns_config``
// which aggregates all of the DNS configuration in a single message.
// This field is deprecated in favor of :ref:`cluster_type<envoy_v3_api_enum_value_config.cluster.v3.Cluster.cluster_type>` and
// will be ignored :ref:`cluster_type<envoy_v3_api_enum_value_config.cluster.v3.Cluster.cluster_type>` is set.
RefreshRate dns_failure_refresh_rate = 44
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// Optional configuration for setting cluster's DNS refresh rate. If the value is set to true,
// cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS
// resolution.
// This field is deprecated in favor of ``dns_config``
// which aggregates all of the DNS configuration in a single message.
// This field is deprecated in favor of :ref:`cluster_type<envoy_v3_api_enum_value_config.cluster.v3.Cluster.cluster_type>` and
// will be ignored :ref:`cluster_type<envoy_v3_api_enum_value_config.cluster.v3.Cluster.cluster_type>` is set.
bool respect_dns_ttl = 39
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

Expand All @@ -1015,8 +1015,6 @@ message Cluster {
// :ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`
// and :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
// This field is deprecated in favor of ``dns_resolution_config``
// which aggregates all of the DNS resolver configuration in a single message.
repeated core.v3.Address dns_resolvers = 18
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

Expand Down
4 changes: 2 additions & 2 deletions source/extensions/clusters/logical_dns/logical_dns_cluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ LogicalDnsClusterFactory::createClusterWithConfig(
absl::StatusOr<std::unique_ptr<LogicalDnsCluster>> cluster_or_error;
if (cluster.has_cluster_type()) {
cluster_or_error = LogicalDnsCluster::create(cluster, proto_config, context,
std::move(*dns_resolver_or_error));
std::move(*dns_resolver_or_error));
} else {
envoy::extensions::clusters::dns::v3::DnsCluster proto_config_legacy{};
createDnsClusterFromLegacyFields(cluster, proto_config_legacy);
cluster_or_error = LogicalDnsCluster::create(cluster, proto_config_legacy, context,
std::move(*dns_resolver_or_error));
std::move(*dns_resolver_or_error));
}

RETURN_IF_NOT_OK(cluster_or_error.status());
Expand Down

0 comments on commit 2464e2c

Please sign in to comment.