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
26 changes: 26 additions & 0 deletions api/v1alpha1/dns_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,27 @@ package v1alpha1

import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

// DNSLookupFamily defines the behavior of Envoy when resolving DNS for hostnames
// +enum
// +kubebuilder:validation:Enum=IPv4;IPv6;IPv4Preferred;IPv6Preferred;IPv4AndIPv6
type DNSLookupFamily string

const (
// IPv4DNSLookupFamily means the DNS resolver will first perform a lookup for addresses in the IPv4 family.
IPv4DNSLookupFamily DNSLookupFamily = "IPv4"
// IPv6DNSLookupFamily means the DNS resolver will first perform a lookup for addresses in the IPv6 family.
IPv6DNSLookupFamily DNSLookupFamily = "IPv6"
// IPv4PreferredDNSLookupFamily means 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.
IPv4PreferredDNSLookupFamily DNSLookupFamily = "IPv4Preferred"
// IPv6PreferredDNSLookupFamily means 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.
IPv6PreferredDNSLookupFamily DNSLookupFamily = "IPv6Preferred"
// IPv4AndIPv6DNSLookupFamily mean 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.
IPv4AndIPv6DNSLookupFamily DNSLookupFamily = "IPv4AndIPv6"
)

type DNS struct {
// DNSRefreshRate specifies the rate at which DNS records should be refreshed.
// Defaults to 30 seconds.
Expand All @@ -15,4 +36,9 @@ type DNS struct {
// If the value is set to true, the DNS refresh rate will be set to the resource record’s TTL.
// Defaults to true.
RespectDNSTTL *bool `json:"respectDnsTtl,omitempty"`
// LookupFamily determines how Envoy would resolve DNS for. If set, this configuration overrides other default
// value that Envoy Gateway configures based on attributes of the backends, such Service resource IPFamilies.
// +optional
// +notImplementedHide
LookupFamily *DNSLookupFamily `json:"lookupFamily,omitempty"`
}
5 changes: 5 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,17 @@ spec:
DNSRefreshRate specifies the rate at which DNS records should be refreshed.
Defaults to 30 seconds.
type: string
lookupFamily:
description: |-
LookupFamily determines how Envoy would resolve DNS for. If set, this configuration overrides other default
value that Envoy Gateway configures based on attributes of the backends, such Service resource IPFamilies.
enum:
- IPv4
- IPv6
- IPv4Preferred
- IPv6Preferred
- IPv4AndIPv6
type: string
respectDnsTtl:
description: |-
RespectDNSTTL indicates whether the DNS Time-To-Live (TTL) should be respected.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,17 @@ spec:
DNSRefreshRate specifies the rate at which DNS records should be refreshed.
Defaults to 30 seconds.
type: string
lookupFamily:
description: |-
LookupFamily determines how Envoy would resolve DNS for. If set, this configuration overrides other default
value that Envoy Gateway configures based on attributes of the backends, such Service resource IPFamilies.
enum:
- IPv4
- IPv6
- IPv4Preferred
- IPv6Preferred
- IPv4AndIPv6
type: string
respectDnsTtl:
description: |-
RespectDNSTTL indicates whether the DNS Time-To-Live (TTL) should be respected.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10767,6 +10767,17 @@ spec:
DNSRefreshRate specifies the rate at which DNS records should be refreshed.
Defaults to 30 seconds.
type: string
lookupFamily:
description: |-
LookupFamily determines how Envoy would resolve DNS for. If set, this configuration overrides other default
value that Envoy Gateway configures based on attributes of the backends, such Service resource IPFamilies.
enum:
- IPv4
- IPv6
- IPv4Preferred
- IPv6Preferred
- IPv4AndIPv6
type: string
respectDnsTtl:
description: |-
RespectDNSTTL indicates whether the DNS Time-To-Live (TTL) should be respected.
Expand Down Expand Up @@ -11754,6 +11765,17 @@ spec:
DNSRefreshRate specifies the rate at which DNS records should be refreshed.
Defaults to 30 seconds.
type: string
lookupFamily:
description: |-
LookupFamily determines how Envoy would resolve DNS for. If set, this configuration overrides other default
value that Envoy Gateway configures based on attributes of the backends, such Service resource IPFamilies.
enum:
- IPv4
- IPv6
- IPv4Preferred
- IPv6Preferred
- IPv4AndIPv6
type: string
respectDnsTtl:
description: |-
RespectDNSTTL indicates whether the DNS Time-To-Live (TTL) should be respected.
Expand Down Expand Up @@ -12834,6 +12856,17 @@ spec:
DNSRefreshRate specifies the rate at which DNS records should be refreshed.
Defaults to 30 seconds.
type: string
lookupFamily:
description: |-
LookupFamily determines how Envoy would resolve DNS for. If set, this configuration overrides other default
value that Envoy Gateway configures based on attributes of the backends, such Service resource IPFamilies.
enum:
- IPv4
- IPv6
- IPv4Preferred
- IPv6Preferred
- IPv4AndIPv6
type: string
respectDnsTtl:
description: |-
RespectDNSTTL indicates whether the DNS Time-To-Live (TTL) should be respected.
Expand Down Expand Up @@ -13829,6 +13862,17 @@ spec:
DNSRefreshRate specifies the rate at which DNS records should be refreshed.
Defaults to 30 seconds.
type: string
lookupFamily:
description: |-
LookupFamily determines how Envoy would resolve DNS for. If set, this configuration overrides other default
value that Envoy Gateway configures based on attributes of the backends, such Service resource IPFamilies.
enum:
- IPv4
- IPv6
- IPv4Preferred
- IPv6Preferred
- IPv4AndIPv6
type: string
respectDnsTtl:
description: |-
RespectDNSTTL indicates whether the DNS Time-To-Live (TTL) should be respected.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,17 @@ spec:
DNSRefreshRate specifies the rate at which DNS records should be refreshed.
Defaults to 30 seconds.
type: string
lookupFamily:
description: |-
LookupFamily determines how Envoy would resolve DNS for. If set, this configuration overrides other default
value that Envoy Gateway configures based on attributes of the backends, such Service resource IPFamilies.
enum:
- IPv4
- IPv6
- IPv4Preferred
- IPv6Preferred
- IPv4AndIPv6
type: string
respectDnsTtl:
description: |-
RespectDNSTTL indicates whether the DNS Time-To-Live (TTL) should be respected.
Expand Down Expand Up @@ -1612,6 +1623,17 @@ spec:
DNSRefreshRate specifies the rate at which DNS records should be refreshed.
Defaults to 30 seconds.
type: string
lookupFamily:
description: |-
LookupFamily determines how Envoy would resolve DNS for. If set, this configuration overrides other default
value that Envoy Gateway configures based on attributes of the backends, such Service resource IPFamilies.
enum:
- IPv4
- IPv6
- IPv4Preferred
- IPv6Preferred
- IPv4AndIPv6
type: string
respectDnsTtl:
description: |-
RespectDNSTTL indicates whether the DNS Time-To-Live (TTL) should be respected.
Expand Down Expand Up @@ -2632,6 +2654,17 @@ spec:
DNSRefreshRate specifies the rate at which DNS records should be refreshed.
Defaults to 30 seconds.
type: string
lookupFamily:
description: |-
LookupFamily determines how Envoy would resolve DNS for. If set, this configuration overrides other default
value that Envoy Gateway configures based on attributes of the backends, such Service resource IPFamilies.
enum:
- IPv4
- IPv6
- IPv4Preferred
- IPv6Preferred
- IPv4AndIPv6
type: string
respectDnsTtl:
description: |-
RespectDNSTTL indicates whether the DNS Time-To-Live (TTL) should be respected.
Expand Down Expand Up @@ -3663,6 +3696,17 @@ spec:
DNSRefreshRate specifies the rate at which DNS records should be refreshed.
Defaults to 30 seconds.
type: string
lookupFamily:
description: |-
LookupFamily determines how Envoy would resolve DNS for. If set, this configuration overrides other default
value that Envoy Gateway configures based on attributes of the backends, such Service resource IPFamilies.
enum:
- IPv4
- IPv6
- IPv4Preferred
- IPv6Preferred
- IPv4AndIPv6
type: string
respectDnsTtl:
description: |-
RespectDNSTTL indicates whether the DNS Time-To-Live (TTL) should be respected.
Expand Down
18 changes: 18 additions & 0 deletions site/content/en/latest/api/extension_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,24 @@ _Appears in:_
| `respectDnsTtl` | _boolean_ | true | | RespectDNSTTL indicates whether the DNS Time-To-Live (TTL) should be respected.<br />If the value is set to true, the DNS refresh rate will be set to the resource record’s TTL.<br />Defaults to true. |


#### DNSLookupFamily

_Underlying type:_ _string_

DNSLookupFamily defines the behavior of Envoy when resolving DNS for hostnames

_Appears in:_
- [DNS](#dns)

| Value | Description |
| ----- | ----------- |
| `IPv4` | IPv4DNSLookupFamily means the DNS resolver will first perform a lookup for addresses in the IPv4 family.<br /> |
| `IPv6` | IPv6DNSLookupFamily means the DNS resolver will first perform a lookup for addresses in the IPv6 family.<br /> |
| `IPv4Preferred` | IPv4PreferredDNSLookupFamily means the DNS resolver will first perform a lookup for addresses in the IPv4 family and fallback<br />to a lookup for addresses in the IPv6 family.<br /> |
| `IPv6Preferred` | IPv6PreferredDNSLookupFamily means the DNS resolver will first perform a lookup for addresses in the IPv6 family and fallback<br />to a lookup for addresses in the IPv4 family.<br /> |
| `IPv4AndIPv6` | IPv4AndIPv6DNSLookupFamily mean the DNS resolver will perform a lookup for both IPv4 and IPv6 families, and return all resolved<br />addresses. When this is used, Happy Eyeballs will be enabled for upstream connections.<br /> |


#### EnvironmentCustomTag


Expand Down
Loading