aws

package
v0.0.0-...-8007e43 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDefaultV2Config

func CreateDefaultV2Config(cfg *externaldns.Config) awsv2.Config

func CreateV2Configs

func CreateV2Configs(cfg *externaldns.Config) map[string]awsv2.Config

Types

type AWSConfig

type AWSConfig struct {
	DomainFilter          endpoint.DomainFilter
	ZoneIDFilter          provider.ZoneIDFilter
	ZoneTypeFilter        provider.ZoneTypeFilter
	ZoneTagFilter         provider.ZoneTagFilter
	ZoneMatchParent       bool
	BatchChangeSize       int
	BatchChangeSizeBytes  int
	BatchChangeSizeValues int
	BatchChangeInterval   time.Duration
	EvaluateTargetHealth  bool
	PreferCNAME           bool
	DryRun                bool
	ZoneCacheDuration     time.Duration
}

AWSConfig contains configuration to create a new AWS provider.

type AWSProvider

type AWSProvider struct {
	provider.BaseProvider
	// contains filtered or unexported fields
}

AWSProvider is an implementation of Provider for AWS Route53.

func NewAWSProvider

func NewAWSProvider(awsConfig AWSConfig, clients map[string]Route53API) (*AWSProvider, error)

NewAWSProvider initializes a new AWS Route53 based Provider.

func (*AWSProvider) AdjustEndpoints

func (p *AWSProvider) AdjustEndpoints(endpoints []*endpoint.Endpoint) ([]*endpoint.Endpoint, error)

AdjustEndpoints modifies the provided endpoints (coming from various sources) to match the endpoints that the provider returns in `Records` so that the change plan will not have unneeded (potentially failing) changes. Example: CNAME endpoints pointing to ELBs will have a `alias` provider-specific property added to match the endpoints generated from existing alias records in Route53.

func (*AWSProvider) ApplyChanges

func (p *AWSProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies a given set of changes in a given zone.

func (*AWSProvider) GetDomainFilter

func (p *AWSProvider) GetDomainFilter() endpoint.DomainFilterInterface

GetDomainFilter generates a filter to exclude any domain that is not controlled by the provider

func (*AWSProvider) Records

func (p *AWSProvider) Records(ctx context.Context) (endpoints []*endpoint.Endpoint, _ error)

Records returns the list of records in a given hosted zone.

func (*AWSProvider) SupportedRecordType

func (p *AWSProvider) SupportedRecordType(recordType route53types.RRType) bool

func (*AWSProvider) Zones

Zones returns the list of hosted zones.

type AWSSessionConfig

type AWSSessionConfig struct {
	AssumeRole           string
	AssumeRoleExternalID string
	APIRetries           int
	Profile              string
}

AWSSessionConfig contains configuration to create a new AWS provider.

type Route53API

type Route53API interface {
	ListResourceRecordSets(ctx context.Context, input *route53.ListResourceRecordSetsInput, optFns ...func(options *route53.Options)) (*route53.ListResourceRecordSetsOutput, error)
	ChangeResourceRecordSets(ctx context.Context, input *route53.ChangeResourceRecordSetsInput, optFns ...func(options *route53.Options)) (*route53.ChangeResourceRecordSetsOutput, error)
	CreateHostedZone(ctx context.Context, input *route53.CreateHostedZoneInput, optFns ...func(*route53.Options)) (*route53.CreateHostedZoneOutput, error)
	ListHostedZones(ctx context.Context, input *route53.ListHostedZonesInput, optFns ...func(options *route53.Options)) (*route53.ListHostedZonesOutput, error)
	ListTagsForResource(ctx context.Context, input *route53.ListTagsForResourceInput, optFns ...func(options *route53.Options)) (*route53.ListTagsForResourceOutput, error)
}

Route53API is the subset of the AWS Route53 API that we actually use. Add methods as required. Signatures must match exactly. mostly taken from: https://github.com/kubernetes/kubernetes/blob/853167624edb6bc0cfdcdfb88e746e178f5db36c/federation/pkg/dnsprovider/providers/aws/route53/stubs/route53api.go

type Route53Change

type Route53Change struct {
	route53types.Change
	OwnedRecord string
	// contains filtered or unexported fields
}

wrapper to handle ownership relation throughout the provider implementation

type Route53Changes

type Route53Changes []*Route53Change

func (Route53Changes) Route53Changes

func (cs Route53Changes) Route53Changes() []route53types.Change

Jump to

Keyboard shortcuts

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