Documentation
¶
Index ¶
- Constants
- Variables
- func GetExternalAddresses(endpoint *externaldns.Endpoint, dnsRecord *v1alpha1.DNSRecord) (externalAddresses []string)
- func GetISO3166Alpha2Codes() []string
- func IsApexDomain(host string, zones []DNSZone) (string, bool)
- func IsContinentCode(code string) bool
- func IsExternalAddress(address string, dnsRecord *v1alpha1.DNSRecord) bool
- func IsISO3166Alpha2Code(code string) bool
- func IsWildCardHost(host string) bool
- func NameForProviderSecret(secret *v1.Secret) (string, error)
- func RegisterProvider(name string, c ProviderConstructor, asDefault bool)
- func RegisterProviderWithClient(name string, c ProviderConstructorWithClient, asDefault bool)
- func RegisteredDefaultProviders() []string
- func SanitizeError(err error) error
- type Config
- type DNSProviderName
- type DNSZone
- type DelegationProviderFunc
- type Factory
- type Provider
- type ProviderConstructor
- type ProviderConstructorWithClient
- type ProviderSpecificLabels
Constants ¶
const ( AWS_CONTINENT_CODE_AFRICA = "AF" AWS_CONTINENT_CODE_ANTARTICA = "AN" AWS_CONTINENT_CODE_ASIA = "AS" AWS_CONTINENT_CODE_EUROPE = "EU" AWS_CONTINENT_CODE_OCEANIA = "OC" AWS_CONTINENT_CODE_NORTH_AMERICA = "NA" AWS_CONTINENT_CODE_SOUTH_AMERICA = "SA" )
Variables ¶
Functions ¶
func GetExternalAddresses ¶ added in v0.2.0
func GetExternalAddresses(endpoint *externaldns.Endpoint, dnsRecord *v1alpha1.DNSRecord) (externalAddresses []string)
func GetISO3166Alpha2Codes ¶
func GetISO3166Alpha2Codes() []string
func IsContinentCode ¶ added in v0.7.0
func IsExternalAddress ¶ added in v0.2.0
func IsISO3166Alpha2Code ¶
IsISO3166Alpha2Code returns true if it's a valid ISO_3166 Alpha 2 country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
func IsWildCardHost ¶ added in v0.14.0
func NameForProviderSecret ¶ added in v0.4.1
func RegisterProvider ¶
func RegisterProvider(name string, c ProviderConstructor, asDefault bool)
func RegisterProviderWithClient ¶ added in v0.15.0
func RegisterProviderWithClient(name string, c ProviderConstructorWithClient, asDefault bool)
func RegisteredDefaultProviders ¶ added in v0.4.1
func RegisteredDefaultProviders() []string
func SanitizeError ¶
SanitizeError removes request specific data from error messages in order to make them consistent across multiple similar requests to the provider. e.g AWS SDK Request ids `request id: 051c860b-9b30-4c19-be1a-1280c3e9fdc4`
Types ¶
type Config ¶ added in v0.2.0
type Config struct {
// filter for specifying a host domain for providers that require it
HostDomainFilter externaldnsendpoint.DomainFilter
// only consider hosted zones managing domains ending in this suffix
DomainFilter externaldnsendpoint.DomainFilter
// filter for zones based on visibility
ZoneTypeFilter externaldnsprovider.ZoneTypeFilter
// only consider hosted zones ending with this zone id
ZoneIDFilter externaldnsprovider.ZoneIDFilter
}
type DNSProviderName ¶ added in v0.14.0
type DNSProviderName string
var ( ErrNoZoneForHost = fmt.Errorf("no zone for host") DNSProviderCoreDNS DNSProviderName = "coredns" DNSProviderAWS DNSProviderName = "aws" DNSProviderAzure DNSProviderName = "azure" DNSProviderGCP DNSProviderName = "google" DNSProviderInMem DNSProviderName = "inmemory" DNSProviderEndpoint DNSProviderName = "endpoint" DNSProviderLabel = "kuadrant.io/dns-provider-name" CoreDNSRecordZoneLabel = "kuadrant.io/coredns-zone-name" )
func (DNSProviderName) String ¶ added in v0.14.0
func (dp DNSProviderName) String() string
type DelegationProviderFunc ¶ added in v0.15.0
type Factory ¶
type Factory interface {
ProviderFor(context.Context, v1alpha1.ProviderAccessor, Config) (Provider, error)
}
Factory is an interface that can be used to obtain Provider implementations. It determines which provider implementation to use by introspecting the given ProviderAccessor resource.
func NewFactory ¶
func NewFactory(c client.Client, d dynamic.Interface, p []string, dpf DelegationProviderFunc) (Factory, error)
NewFactory returns a new provider factory with the given client and given providers enabled. Will return an error if any given provider has no registered provider implementation.
type Provider ¶
type Provider interface {
externaldnsprovider.Provider
// DNSZones returns a list of dns zones accessible for this provider
DNSZones(ctx context.Context) ([]DNSZone, error)
// DNSZoneForHost returns the DNSZone that best matches the given host in the providers list of zones
DNSZoneForHost(ctx context.Context, host string) (*DNSZone, error)
ProviderSpecific() ProviderSpecificLabels
Name() DNSProviderName
Labels() map[string]string
}
Provider knows how to manage DNS zones only as pertains to routing.
type ProviderConstructor ¶
ProviderConstructor constructs a provider given a Secret resource and a Context. An error will be returned if the appropriate provider is not registered.