source

package
v0.15.6 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Apache-2.0, BSD-3-Clause, MIT Imports: 28 Imported by: 3

Documentation

Index

Constants

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

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

func NewState

func NewState(ownerState *ownerState) interface{}

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

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

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
}

type DNSSource

type DNSSource interface {
	Setup()

	CreateDNSFeedback(obj resources.Object) DNSFeedback
	GetDNSInfo(logger logger.LogContext, obj resources.Object, 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.Object, names dns.DNSNameSet) (targets utils.StringSet, texts utils.StringSet, err 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.Object, current *DNSCurrentState) (*DNSInfo, error)

func (*DefaultDNSSource) Setup

func (this *DefaultDNSSource) Setup()

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, state *DNSState)

func (*EventFeedback) Invalid

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

func (*EventFeedback) Pending

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

func (*EventFeedback) Ready

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

func (*EventFeedback) Succeeded

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

type Events

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

func NewEvents

func NewEvents() *Events

func (*Events) Delete

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

func (*Events) Deleted

func (this *Events) Deleted(logger 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

Jump to

Keyboard shortcuts

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