-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move cluster dns config and validate in strict dns clusters
Signed-off-by: Steven Jin Xuan <[email protected]>
- Loading branch information
1 parent
b203e3e
commit 072cab0
Showing
12 changed files
with
218 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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_xds//udpa/annotations:pkg"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
syntax = "proto3"; | ||
|
||
package envoy.extensions.clusters.dns.v3; | ||
|
||
import "google/protobuf/any.proto"; | ||
import "google/protobuf/duration.proto"; | ||
import "google/protobuf/struct.proto"; | ||
import "google/protobuf/wrappers.proto"; | ||
|
||
import "udpa/annotations/migrate.proto"; | ||
import "udpa/annotations/security.proto"; | ||
import "udpa/annotations/status.proto"; | ||
import "udpa/annotations/versioning.proto"; | ||
import "validate/validate.proto"; | ||
|
||
option java_package = "io.envoyproxy.envoy.extensions.clusters.dns.v3"; | ||
option java_outer_classname = "ClusterProto"; | ||
option java_multiple_files = true; | ||
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/clusters/dns/v3;dnsv3"; | ||
option (udpa.annotations.file_status).package_version_status = ACTIVE; | ||
|
||
// import "envoy/config/core/v3/extension.proto"; | ||
|
||
// [#protodoc-title: DNS cluster configuration] | ||
|
||
// Configuration for the dynamic forward proxy cluster. See the :ref:`architecture overview | ||
// <arch_overview_http_dynamic_forward_proxy>` for more information. | ||
// [#extension: envoy.clusters.dns] | ||
|
||
// [#next-free-field: 55] | ||
message DnsConfig { | ||
// When V4_ONLY is selected, the DNS resolver will only perform a lookup for | ||
// addresses in the IPv4 family. If V6_ONLY is selected, the DNS resolver will | ||
// only perform a lookup for addresses in the IPv6 family. If AUTO is | ||
// specified, the DNS resolver will first perform a lookup for addresses in | ||
// the IPv6 family and fallback to a lookup for addresses in the IPv4 family. | ||
// This is semantically equivalent to a non-existent V6_PREFERRED option. | ||
// AUTO is a legacy name that is more opaque than | ||
// necessary and will be deprecated in favor of V6_PREFERRED in a future major version of the API. | ||
// If V4_PREFERRED is specified, the DNS resolver will first perform a lookup for addresses in the | ||
// IPv4 family and fallback to a lookup for addresses in the IPv6 family. i.e., the callback | ||
// target will only get v6 addresses if there were NO v4 addresses to return. | ||
// If ALL is specified, the DNS resolver will perform a lookup for both IPv4 and IPv6 families, | ||
// and return all resolved addresses. When this is used, Happy Eyeballs will be enabled for | ||
// upstream connections. Refer to :ref:`Happy Eyeballs Support <arch_overview_happy_eyeballs>` | ||
// for more information. | ||
// For cluster types 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. | ||
// [#next-major-version: deprecate AUTO in favor of a V6_PREFERRED option.] | ||
enum LookupFamily { | ||
AUTO = 0; | ||
V4_ONLY = 1; | ||
V6_ONLY = 2; | ||
V4_PREFERRED = 3; | ||
ALL = 4; | ||
} | ||
|
||
message RefreshRate { | ||
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Cluster.RefreshRate"; | ||
|
||
// Specifies the base interval between refreshes. This parameter is required and must be greater | ||
// than zero and less than | ||
// :ref:`max_interval <envoy_v3_api_field_config.cluster.v3.Cluster.RefreshRate.max_interval>`. | ||
google.protobuf.Duration base_interval = 1 [(validate.rules).duration = { | ||
required: true | ||
gt {nanos: 1000000} | ||
}]; | ||
|
||
// Specifies the maximum interval between refreshes. This parameter is optional, but must be | ||
// greater than or equal to the | ||
// :ref:`base_interval <envoy_v3_api_field_config.cluster.v3.Cluster.RefreshRate.base_interval>` if set. The default | ||
// is 10 times the :ref:`base_interval <envoy_v3_api_field_config.cluster.v3.Cluster.RefreshRate.base_interval>`. | ||
google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {nanos: 1000000}}]; | ||
} | ||
|
||
// If the DNS refresh rate is specified and the cluster type is either | ||
// :ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`, | ||
// or :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`, | ||
// this value is used as the cluster’s DNS refresh | ||
// rate. The value configured must be at least 1ms. If this setting is not specified, the | ||
// value defaults to 5000ms. For cluster types 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. | ||
google.protobuf.Duration refresh_rate = 16 [(validate.rules).duration = {gt {nanos: 1000000}}]; | ||
|
||
// If the DNS failure refresh rate is specified and the cluster type is either | ||
// :ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`, | ||
// or :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`, | ||
// this is used as the cluster’s DNS refresh rate when requests are failing. If this setting is | ||
// not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types | ||
// 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. | ||
RefreshRate dns_failure_refresh_rate = 44; | ||
|
||
// 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. | ||
bool respect_ttl = 39; | ||
|
||
// The DNS IP address resolution policy. If this setting is not specified, the | ||
// value defaults to | ||
// :ref:`AUTO<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DnsLookupFamily.AUTO>`. | ||
LookupFamily lookup_family = 17 [(validate.rules).enum = {defined_only: true}]; | ||
|
||
// DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, | ||
// or any other DNS resolver types and the related parameters. | ||
// For example, an object of | ||
// :ref:`CaresDnsResolverConfig <envoy_v3_api_msg_extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig>` | ||
// can be packed into this ``typed_dns_resolver_config``. This configuration replaces the | ||
// :ref:`dns_resolution_config <envoy_v3_api_field_config.cluster.v3.Cluster.dns_resolution_config>` | ||
// configuration. | ||
// During the transition period when both ``dns_resolution_config`` and ``typed_dns_resolver_config`` exists, | ||
// when ``typed_dns_resolver_config`` is in place, Envoy will use it and ignore ``dns_resolution_config``. | ||
// When ``typed_dns_resolver_config`` is missing, the default behavior is in place. | ||
// [#extension-category: envoy.network.dns_resolver] | ||
// FIXMEcore.v3.TypedExtensionConfig typed_resolver_config = 55; | ||
|
||
// Optional configuration for having cluster readiness block on warm-up. Currently, only applicable for | ||
// :ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`, | ||
// or :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`, | ||
// or :ref:`Redis Cluster<arch_overview_redis>`. | ||
// If true, cluster readiness blocks on warm-up. If false, the cluster will complete | ||
// initialization whether or not warm-up has completed. Defaults to true. | ||
google.protobuf.BoolValue wait_for_warm_on_init = 54; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.