dns

package
v0.0.0-...-e7c744b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBaseDomain

func GetBaseDomain() (string, error)

GetBaseDomain returns the DNS base domain from [dns.domain] config. Changes the read domain to lowercase to ensure it's DNS-1123 compliant

func UnsubscribeDnsEvents

func UnsubscribeDnsEvents(id uuid.UUID)

UnsubscribeDnsEvents deletes the subscription with the given id

func ValidateSubdomain

func ValidateSubdomain(subdomain string) error

ValidateSubdomain verifies if the provided subdomain string complies with DNS-1123

func ValidateWildcardSubdomain

func ValidateWildcardSubdomain(subdomain string) error

ValidateWildcardSubdomain verifies if the provided subdomain string complies with wildcard DNS-1123

Types

type DnsEventsSubscription

type DnsEventsSubscription struct {
	Id     uuid.UUID
	Events <-chan interface{}
}

DnsEventsSubscription represents a subscription to Dns events

func SubscribeDnsEvents

func SubscribeDnsEvents() *DnsEventsSubscription

SubscribeDnsEvents returns DnsEventsSubscription to caller. The subscriber can receive DNS domain related events from the Events field of the subscription

type DnsServiceClient

type DnsServiceClient interface {
	RegisterDomain(orgId uint, domain string) error
	UnregisterDomain(orgId uint, domain string) error
	IsDomainRegistered(orgId uint, domain string) (bool, error)
	GetOrgDomain(orgId uint) (string, error)
	Cleanup()
	DeleteDnsRecordsOwnedBy(ownerId string, orgId uint) error
	ProcessUnfinishedTasks()
}

DnsServiceClient contains the operations for managing domains in a Dns Service

func GetExternalDnsServiceClient

func GetExternalDnsServiceClient() (DnsServiceClient, error)

GetExternalDnsServiceClient creates a new external dns service client

type ExternalDnsAwsCredentials

type ExternalDnsAwsCredentials struct {
	AccessKey string `json:"accessKey,omitempty" yaml:"accessKey,omitempty"`
	SecretKey string `json:"secretKey,omitempty" yaml:"secretKey,omitempty"`
	MountPath string `json:"mountPath,omitempty" yaml:"mountPath,omitempty"`
}

type ExternalDnsAwsSettings

type ExternalDnsAwsSettings struct {
	Credentials     *ExternalDnsAwsCredentials `json:"credentials,omitempty" yaml:"credentials,omitempty"`
	Region          string                     `json:"region,omitempty" yaml:"region,omitempty"`
	ZoneType        string                     `json:"zoneType,omitempty" yaml:"zoneType,omitempty"`
	AssumeRoleArn   string                     `json:"assumeRoleArn,omitempty" yaml:"assumeRoleArn,omitempty"`
	BatchChangeSize uint                       `json:"batchChangeSize,omitempty" yaml:"batchChangeSize,omitempty"`
}

type ExternalDnsChartValues

type ExternalDnsChartValues struct {
	Sources       []string                      `json:"sources,omitempty" yaml:"sources,omitempty"`
	Rbac          *ExternalDnsRbacSettings      `json:"rbac,omitempty" yaml:"rbac,omitempty"`
	Image         *ExternalDnsImageSettings     `json:"image,omitempty" yaml:"image,omitempty"`
	DomainFilters []string                      `json:"domainFilters,omitempty" yaml:"domainFilters,omitempty"`
	Policy        string                        `json:"policy,omitempty" yaml:"policy,omitempty"`
	TxtOwnerId    string                        `json:"txtOwnerId,omitempty" yaml:"txtOwnerId,omitempty"`
	ExtraArgs     map[string]string             `json:"extraArgs,omitempty" yaml:"extraArgs,omitempty"`
	TxtPrefix     string                        `json:"txtPrefix,omitempty" yaml:"txtPrefix,omitempty"`
	Crd           *ExternalDnsCrdSourceSettings `json:"crd,omitempty" yaml:"crd,omitempty"`
	Aws           *ExternalDnsAwsSettings       `json:"aws,omitempty" yaml:"aws,omitempty"`
}

ExternalDnsChartValues describes external-dns helm chart values (https://hub.helm.sh/charts/stable/external-dns)

type ExternalDnsCrdSourceSettings

type ExternalDnsCrdSourceSettings struct {
	Create     bool   `json:"create,omitempty" yaml:"create,omitempty"`
	Apiversion string `json:"apiversion,omitempty" yaml:"apiversion,omitempty"`
	Kind       string `json:"kind,omitempty" yaml:"kind,omitempty"`
}

type ExternalDnsImageSettings

type ExternalDnsImageSettings struct {
	Registry   string `json:"registry,omitempty" yaml:"registry,omitempty"`
	Repository string `json:"repository,omitempty" yaml:"repository,omitempty"`
	Tag        string `json:"tag,omitempty" yaml:"tag,omitempty"`
}

type ExternalDnsRbacSettings

type ExternalDnsRbacSettings struct {
	Create             bool   `json:"create,omitempty" yaml:"create,omitempty"`
	ServiceAccountName string `json:"serviceAccountName,omitempty" yaml:"serviceAccountName,omitempty"`
	ApiVersion         string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"`
	PspEnabled         bool   `json:"pspEnabled,omitempty" yaml:"pspEnabled,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL