dnsrecord

package
v1.39.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 29 Imported by: 16

Documentation

Index

Constants

View Source
const (
	// FinalizerName is the dnsrecord controller finalizer.
	FinalizerName = "extensions.gardener.cloud/dnsrecord"
	// ControllerName is the name of the controller
	ControllerName = "dnsrecord_controller"
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager, args AddArgs) error

Add creates a new dnsrecord controller and adds it to the given Manager.

func ClusterToDNSRecordMapper

func ClusterToDNSRecordMapper(predicates []predicate.Predicate) mapper.Mapper

ClusterToDNSRecordMapper returns a mapper that returns requests for DNSRecords whose referenced clusters have been modified.

func DefaultPredicates

func DefaultPredicates(ignoreOperationAnnotation bool) []predicate.Predicate

DefaultPredicates returns the default predicates for a dnsrecord reconciler.

func FindZoneForName

func FindZoneForName(zones map[string]string, name string) string

FindZoneForName returns the zone ID for the longest zone domain from the given zones map that is matched by the given name. If the given name doesn't match any of the zone domains in the given zones map, an empty string is returned.

func GetMetaRecordName

func GetMetaRecordName(name string) string

GetMetaRecordName returns the meta record name for the given name.

func MatchesDomain

func MatchesDomain(name, domain string) bool

MatchesDomain returns true if the given name matches (is a subdomain) of the given domain, false otherwise.

func NewReconciler

func NewReconciler(actuator Actuator) reconcile.Reconciler

NewReconciler creates a new reconcile.Reconciler that reconciles dnsrecord resources of Gardener's `extensions.gardener.cloud` API group.

Types

type Actuator

type Actuator interface {
	// Reconcile reconciles the DNSRecord.
	Reconcile(context.Context, *extensionsv1alpha1.DNSRecord, *extensionscontroller.Cluster) error
	// Delete deletes the DNSRecord.
	Delete(context.Context, *extensionsv1alpha1.DNSRecord, *extensionscontroller.Cluster) error
	// Restore restores the DNSRecord.
	Restore(context.Context, *extensionsv1alpha1.DNSRecord, *extensionscontroller.Cluster) error
	// Migrate migrates the DNSRecord.
	Migrate(context.Context, *extensionsv1alpha1.DNSRecord, *extensionscontroller.Cluster) error
}

Actuator acts upon DNSRecord resources.

type AddArgs

type AddArgs struct {
	// Actuator is an dnsrecord actuator.
	Actuator Actuator
	// ControllerOptions are the controller options used for creating a controller.
	// The options.Reconciler is always overridden with a reconciler created from the
	// given actuator.
	ControllerOptions controller.Options
	// Predicates are the predicates to use.
	// If unset, GenerationChangedPredicate will be used.
	Predicates []predicate.Predicate
	// Type is the type of the resource considered for reconciliation.
	Type string
	// IgnoreOperationAnnotation specifies whether to ignore the operation annotation or not.
	// If the annotation is not ignored, the extension controller will only reconcile
	// with a present operation annotation typically set during a reconcile (e.g in the maintenance time) by the Gardenlet
	IgnoreOperationAnnotation bool
}

AddArgs are arguments for adding an dnsrecord controller to a manager.

Jump to

Keyboard shortcuts

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