source

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 29 Imported by: 3

Documentation

Index

Constants

View Source
const (
	CONTROLLER_GROUP_DNS_SOURCES = dns.CONTROLLER_GROUP_DNS_SOURCES
	TARGET_CLUSTER               = "target"
)
View Source
const (
	DNS_ANNOTATION            = dns.DNS_ANNOTATION
	TTL_ANNOTATION            = dns.ANNOTATION_GROUP + "/ttl"
	PERIOD_ANNOTATION         = dns.ANNOTATION_GROUP + "/cname-lookup-interval"
	ROUTING_POLICY_ANNOTATION = dns.ANNOTATION_GROUP + "/routing-policy"
	CLASS_ANNOTATION          = dns.CLASS_ANNOTATION
	OWNER_ID_ANNOTATION       = dns.ANNOTATION_GROUP + "/owner-id"
)
View Source
const (
	OPT_CLASS                      = "dns-class"
	OPT_TARGET_CLASS               = "dns-target-class"
	OPT_EXCLUDE                    = "exclude-domains"
	OPT_KEY                        = "key"
	OPT_NAMESPACE                  = "target-namespace"
	OPT_NAMEPREFIX                 = "target-name-prefix"
	OPT_TARGET_CREATOR_LABEL_NAME  = "target-creator-label-name"
	OPT_TARGET_CREATOR_LABEL_VALUE = "target-creator-label-value"
	OPT_TARGET_OWNER_ID            = "target-owner-id"
	OPT_TARGET_OWNER_OBJECT        = "target-owner-object"
	OPT_TARGET_SET_IGNORE_OWNERS   = "target-set-ignore-owners"
	OPT_TARGET_REALMS              = "target-realms"
)
View Source
const KEY_STATE = "source-state"

Variables

View Source
var SlaveResources = reconcilers.ClusterResources(TARGET_CLUSTER, entryGroupKind)

Functions

func DNSSourceController

func DNSSourceController(source DNSSourceType, reconcilerType controller.ReconcilerType) controller.Configuration

func MasterResourcesType

func MasterResourcesType(kind schema.GroupKind) reconcilers.Resources

func NewSlaveAccessSpec added in v0.7.21

func NewSlaveAccessSpec(c controller.Interface, sourceType DNSSourceType) reconcilers.SlaveAccessSpec

NewSlaveAccessSpec creates a new SlaveAccessSpec.

func NewState

func NewState(ownerState *ownerState) interface{}

NewState creates a new owner state.

func OptionIsSet added in v0.11.0

func OptionIsSet(name string) watches.WatchConstraint

func OwnerReconciler added in v0.11.0

func OwnerReconciler(c controller.Interface) (reconcile.Interface, error)

func RequireFinalizer added in v0.10.0

func RequireFinalizer(src resources.Object, cluster resources.Cluster) bool

RequireFinalizer checks if a source object needs a finalizer.

func SlaveAccessSpecCreatorForSource added in v0.7.21

func SlaveAccessSpecCreatorForSource(sourceType DNSSourceType) reconcilers.SlaveAccessSpecCreator

func SlaveReconcilerType

func SlaveReconcilerType(c controller.Interface) (reconcile.Interface, error)

func SourceReconciler

func SourceReconciler(sourceType DNSSourceType, rtype controller.ReconcilerType) controller.ReconcilerType

SourceReconciler returns a ReconcilerType method.

Types

type DNSCurrentState

type DNSCurrentState struct {
	Names                  map[dns.DNSSetName]*DNSState
	Targets                utils.StringSet
	AnnotatedNames         utils.StringSet
	AnnotatedRoutingPolicy *v1alpha1.RoutingPolicy
}

func (*DNSCurrentState) GetSetIdentifier added in v0.13.0

func (s *DNSCurrentState) GetSetIdentifier() string

type DNSFeedback

type DNSFeedback interface {
	Succeeded(logger logger.LogContext)
	Pending(logger logger.LogContext, dnsname string, msg string, dnsState *DNSState)
	Ready(logger logger.LogContext, dnsname string, msg string, dnsState *DNSState)
	Invalid(logger logger.LogContext, dnsname string, err error, dnsState *DNSState)
	Failed(logger logger.LogContext, dnsname string, err error, dnsState *DNSState)
	Deleted(logger logger.LogContext, dnsname string, msg string)
	Created(logger logger.LogContext, dnsname string, name resources.ObjectName)
}

func NewEventFeedback

func NewEventFeedback(obj resources.Object, events map[string]string) DNSFeedback

type DNSInfo

type DNSInfo struct {
	Names         dns.DNSNameSet
	OwnerId       *string
	TTL           *int64
	Interval      *int64
	Targets       utils.StringSet
	Text          utils.StringSet
	OrigRef       *v1alpha1.EntryReference
	TargetRef     *v1alpha1.EntryReference
	RoutingPolicy *v1alpha1.RoutingPolicy
	IPStack       string
}

type DNSSource

type DNSSource interface {
	Setup() error

	CreateDNSFeedback(obj resources.Object) DNSFeedback
	GetDNSInfo(logger logger.LogContext, obj resources.ObjectData, current *DNSCurrentState) (*DNSInfo, error)

	Delete(logger logger.LogContext, obj resources.Object) reconcile.Status
	Deleted(logger logger.LogContext, key resources.ClusterObjectKey)
}

type DNSSourceCreator

type DNSSourceCreator func(controller.Interface) (DNSSource, error)

type DNSSourceType

type DNSSourceType interface {
	Name() string
	GroupKind() schema.GroupKind
	Create(controller.Interface) (DNSSource, error)
}

func NewDNSSouceTypeForCreator

func NewDNSSouceTypeForCreator(name string, kind schema.GroupKind, handler DNSSourceCreator) DNSSourceType

func NewDNSSouceTypeForExtractor

func NewDNSSouceTypeForExtractor(name string, kind schema.GroupKind, handler DNSTargetExtractor) DNSSourceType

type DNSState

type DNSState struct {
	v1alpha1.DNSEntryStatus
	CreationTimestamp metav1.Time
}

type DNSTargetExtractor

type DNSTargetExtractor func(logger logger.LogContext, obj resources.ObjectData, names dns.DNSNameSet) (*TargetExtraction, error)

type DefaultDNSSource

type DefaultDNSSource struct {
	*Events
	// contains filtered or unexported fields
}

func NewDefaultDNSSource

func NewDefaultDNSSource(handler DNSTargetExtractor) DefaultDNSSource

func (*DefaultDNSSource) CreateDNSFeedback

func (this *DefaultDNSSource) CreateDNSFeedback(obj resources.Object) DNSFeedback

func (*DefaultDNSSource) GetDNSInfo

func (this *DefaultDNSSource) GetDNSInfo(logger logger.LogContext, obj resources.ObjectData, current *DNSCurrentState) (*DNSInfo, error)

func (*DefaultDNSSource) Setup

func (this *DefaultDNSSource) Setup() error

type EventFeedback

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

func (*EventFeedback) Created added in v0.11.0

func (this *EventFeedback) Created(logger logger.LogContext, dnsname string, name resources.ObjectName)

func (*EventFeedback) Deleted

func (this *EventFeedback) Deleted(logger logger.LogContext, dnsname string, msg string)

func (*EventFeedback) Failed

func (this *EventFeedback) Failed(logger logger.LogContext, dnsname string, err error, _ *DNSState)

func (*EventFeedback) Invalid

func (this *EventFeedback) Invalid(logger logger.LogContext, dnsname string, msg error, _ *DNSState)

func (*EventFeedback) Pending

func (this *EventFeedback) Pending(logger logger.LogContext, dnsname, msg string, _ *DNSState)

func (*EventFeedback) Ready

func (this *EventFeedback) Ready(logger logger.LogContext, dnsname, msg string, _ *DNSState)

func (*EventFeedback) Succeeded

func (this *EventFeedback) Succeeded(_ logger.LogContext)

type Events

type Events struct {
	Events map[resources.ClusterObjectKey]map[string]string
	// contains filtered or unexported fields
}

Events stores events per cluster object key.

func NewEvents

func NewEvents() *Events

NewEvents creates a new Events object.

func (*Events) Delete

func (this *Events) Delete(logger logger.LogContext, obj resources.Object) reconcile.Status

func (*Events) Deleted

func (this *Events) Deleted(_ logger.LogContext, key resources.ClusterObjectKey)

func (*Events) GetEvents

func (this *Events) GetEvents(key resources.ClusterObjectKey) map[string]string

func (*Events) HasEvents

func (this *Events) HasEvents(key resources.ClusterObjectKey) bool

type TargetExtraction added in v0.17.0

type TargetExtraction struct {
	Targets utils.StringSet
	Texts   utils.StringSet
	IPStack string
}

Jump to

Keyboard shortcuts

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