Documentation
¶
Index ¶
- Constants
- Variables
- func DNSSourceController(source DNSSourceType, reconcilerType controller.ReconcilerType) controller.Configuration
- func MasterResourcesType(kind schema.GroupKind) reconcilers.Resources
- func NewSlaveAccessSpec(c controller.Interface, sourceType DNSSourceType) reconcilers.SlaveAccessSpec
- func NewState() any
- func OptionIsSet(name string) watches.WatchConstraint
- func RequireFinalizer(src resources.Object, cluster resources.Cluster) bool
- func SlaveAccessSpecCreatorForSource(sourceType DNSSourceType) reconcilers.SlaveAccessSpecCreator
- func SlaveReconcilerType(c controller.Interface) (reconcile.Interface, error)
- func SourceReconciler(sourceType DNSSourceType, rtype controller.ReconcilerType) controller.ReconcilerType
- type DNSCurrentState
- type DNSFeedback
- type DNSInfo
- type DNSSource
- type DNSSourceCreator
- type DNSSourceType
- type DNSState
- type DNSTargetExtractor
- type DefaultDNSSource
- type EventFeedback
- func (this *EventFeedback) Created(logger logger.LogContext, dnsname string, name resources.ObjectName)
- func (this *EventFeedback) Deleted(logger logger.LogContext, dnsname string, msg string)
- func (this *EventFeedback) Failed(logger logger.LogContext, dnsname string, err error, _ *DNSState)
- func (this *EventFeedback) Invalid(logger logger.LogContext, dnsname string, msg error, _ *DNSState)
- func (this *EventFeedback) Pending(logger logger.LogContext, dnsname, msg string, _ *DNSState)
- func (this *EventFeedback) Ready(logger logger.LogContext, dnsname, msg string, _ *DNSState)
- func (this *EventFeedback) Succeeded(_ logger.LogContext)
- type Events
- func (this *Events) Delete(logger logger.LogContext, obj resources.Object) reconcile.Status
- func (this *Events) Deleted(_ logger.LogContext, key resources.ClusterObjectKey)
- func (this *Events) GetEvents(key resources.ClusterObjectKey) map[string]TimestampedMessage
- func (this *Events) HasEvents(key resources.ClusterObjectKey) bool
- type TargetExtraction
- type TimestampedMessage
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 // RESOLVE_TARGETS_TO_ADDRS_ANNOTATION is the annotation key for source objects to set the `.spec.resolveTargetsToAddresses` in the DNSEntry. RESOLVE_TARGETS_TO_ADDRS_ANNOTATION = dns.ANNOTATION_GROUP + "/resolve-targets-to-addresses" )
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_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 OptionIsSet ¶ added in v0.11.0
func OptionIsSet(name string) watches.WatchConstraint
func RequireFinalizer ¶ added in v0.10.0
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]TimestampedMessage) DNSFeedback
type DNSInfo ¶
type DNSInfo struct {
Names dns.DNSNameSet
TTL *int64
Interval *int64
Targets utils.StringSet
Text utils.StringSet
OrigRef *v1alpha1.EntryReference
TargetRef *v1alpha1.EntryReference
RoutingPolicy *v1alpha1.RoutingPolicy
IPStack string
ResolveTargetsToAddresses *bool
Ignore 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 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]TimestampedMessage
// contains filtered or unexported fields
}
Events stores events per cluster object key.
func (*Events) Deleted ¶
func (this *Events) Deleted(_ logger.LogContext, key resources.ClusterObjectKey)
func (*Events) GetEvents ¶
func (this *Events) GetEvents(key resources.ClusterObjectKey) map[string]TimestampedMessage
type TargetExtraction ¶ added in v0.17.0
type TimestampedMessage ¶ added in v0.23.6
TimestampedMessage stores a message with a timestamp.
func NewTimestampedMessage ¶ added in v0.23.6
func NewTimestampedMessage(msg string) TimestampedMessage
NewTimestampedMessage creates a new TimestampedMessage with the current time.
func (TimestampedMessage) IsOutdated ¶ added in v0.23.6
func (m TimestampedMessage) IsOutdated(duration time.Duration) bool
IsOutdated checks if the message is outdated based on the given duration.
Click to show internal directories.
Click to hide internal directories.