registry

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSSDRegistry added in v0.5.2

type AWSSDRegistry struct {
	// contains filtered or unexported fields
}

AWSSDRegistry implements registry interface with ownership information associated via the Description field of SD Service

func NewAWSSDRegistry added in v0.5.2

func NewAWSSDRegistry(provider provider.Provider, ownerID string) (*AWSSDRegistry, error)

NewAWSSDRegistry returns implementation of registry for AWS SD

func (*AWSSDRegistry) AdjustEndpoints added in v0.7.5

func (sdr *AWSSDRegistry) AdjustEndpoints(endpoints []*endpoint.Endpoint) ([]*endpoint.Endpoint, error)

AdjustEndpoints modifies the endpoints as needed by the specific provider

func (*AWSSDRegistry) ApplyChanges added in v0.5.2

func (sdr *AWSSDRegistry) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges filters out records not owned the External-DNS, additionally it adds the required label inserted in the AWS SD instance as a CreateID field

func (*AWSSDRegistry) GetDomainFilter added in v0.9.0

func (sdr *AWSSDRegistry) GetDomainFilter() endpoint.DomainFilterInterface

func (*AWSSDRegistry) OwnerID added in v0.14.0

func (im *AWSSDRegistry) OwnerID() string

func (*AWSSDRegistry) Records added in v0.5.2

func (sdr *AWSSDRegistry) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records calls AWS SD API and expects AWS SD provider to provider Owner/Resource information as a serialized value in the AWSSDDescriptionLabel value in the Labels map

type DynamoDBAPI added in v0.13.6

type DynamoDBAPI interface {
	DescribeTableWithContext(ctx aws.Context, input *dynamodb.DescribeTableInput, opts ...request.Option) (*dynamodb.DescribeTableOutput, error)
	ScanPagesWithContext(ctx aws.Context, input *dynamodb.ScanInput, fn func(*dynamodb.ScanOutput, bool) bool, opts ...request.Option) error
	BatchExecuteStatementWithContext(aws.Context, *dynamodb.BatchExecuteStatementInput, ...request.Option) (*dynamodb.BatchExecuteStatementOutput, error)
}

DynamoDBAPI is the subset of the AWS Route53 API that we actually use. Add methods as required. Signatures must match exactly.

type DynamoDBRegistry added in v0.13.6

type DynamoDBRegistry struct {
	// contains filtered or unexported fields
}

DynamoDBRegistry implements registry interface with ownership implemented via an AWS DynamoDB table.

func NewDynamoDBRegistry added in v0.13.6

func NewDynamoDBRegistry(provider provider.Provider, ownerID string, dynamodbAPI DynamoDBAPI, table string, txtPrefix, txtSuffix, txtWildcardReplacement string, managedRecordTypes, excludeRecordTypes []string, txtEncryptAESKey []byte, cacheInterval time.Duration) (*DynamoDBRegistry, error)

NewDynamoDBRegistry returns a new DynamoDBRegistry object.

func (*DynamoDBRegistry) AdjustEndpoints added in v0.13.6

func (im *DynamoDBRegistry) AdjustEndpoints(endpoints []*endpoint.Endpoint) ([]*endpoint.Endpoint, error)

AdjustEndpoints modifies the endpoints as needed by the specific provider.

func (*DynamoDBRegistry) ApplyChanges added in v0.13.6

func (im *DynamoDBRegistry) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges updates the DNS provider and DynamoDB table with the changes.

func (*DynamoDBRegistry) GetDomainFilter added in v0.13.6

func (im *DynamoDBRegistry) GetDomainFilter() endpoint.DomainFilterInterface

func (*DynamoDBRegistry) OwnerID added in v0.14.0

func (im *DynamoDBRegistry) OwnerID() string

func (*DynamoDBRegistry) Records added in v0.13.6

func (im *DynamoDBRegistry) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records returns the current records from the registry.

type NoopRegistry

type NoopRegistry struct {
	// contains filtered or unexported fields
}

NoopRegistry implements registry interface without ownership directly propagating changes to dns provider

func NewNoopRegistry

func NewNoopRegistry(provider provider.Provider) (*NoopRegistry, error)

NewNoopRegistry returns new NoopRegistry object

func (*NoopRegistry) AdjustEndpoints added in v0.7.5

func (im *NoopRegistry) AdjustEndpoints(endpoints []*endpoint.Endpoint) ([]*endpoint.Endpoint, error)

AdjustEndpoints modifies the endpoints as needed by the specific provider

func (*NoopRegistry) ApplyChanges

func (im *NoopRegistry) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges propagates changes to the dns provider

func (*NoopRegistry) GetDomainFilter added in v0.9.0

func (im *NoopRegistry) GetDomainFilter() endpoint.DomainFilterInterface

func (*NoopRegistry) OwnerID added in v0.14.0

func (im *NoopRegistry) OwnerID() string

func (*NoopRegistry) Records

func (im *NoopRegistry) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records returns the current records from the dns provider

type Registry

type Registry interface {
	Records(ctx context.Context) ([]*endpoint.Endpoint, error)
	ApplyChanges(ctx context.Context, changes *plan.Changes) error
	AdjustEndpoints(endpoints []*endpoint.Endpoint) ([]*endpoint.Endpoint, error)
	GetDomainFilter() endpoint.DomainFilterInterface
	OwnerID() string
}

Registry is an interface which should enables ownership concept in external-dns Records() returns ALL records registered with DNS provider each entry includes owner information ApplyChanges(changes *plan.Changes) propagates the changes to the DNS Provider API and correspondingly updates ownership depending on type of registry being used

type TXTRegistry

type TXTRegistry struct {
	// contains filtered or unexported fields
}

TXTRegistry implements registry interface with ownership implemented via associated TXT records

func NewTXTRegistry

func NewTXTRegistry(provider provider.Provider, txtPrefix, txtSuffix, ownerID string, cacheInterval time.Duration, txtWildcardReplacement string, managedRecordTypes, excludeRecordTypes []string, txtEncryptEnabled bool, txtEncryptAESKey []byte) (*TXTRegistry, error)

NewTXTRegistry returns new TXTRegistry object

func (*TXTRegistry) AdjustEndpoints added in v0.7.5

func (im *TXTRegistry) AdjustEndpoints(endpoints []*endpoint.Endpoint) ([]*endpoint.Endpoint, error)

AdjustEndpoints modifies the endpoints as needed by the specific provider

func (*TXTRegistry) ApplyChanges

func (im *TXTRegistry) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges updates dns provider with the changes for each created/deleted record it will also take into account TXT records for creation/deletion

func (*TXTRegistry) GetDomainFilter added in v0.9.0

func (im *TXTRegistry) GetDomainFilter() endpoint.DomainFilterInterface

func (*TXTRegistry) OwnerID added in v0.14.0

func (im *TXTRegistry) OwnerID() string

func (*TXTRegistry) Records

func (im *TXTRegistry) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records returns the current records from the registry excluding TXT Records If TXT records was created previously to indicate ownership its corresponding value will be added to the endpoints Labels map

Jump to

Keyboard shortcuts

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