controller

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProbeOwnerLabel         = "kuadrant.io/health-probes-owner"
	DNSHealthCheckFinalizer = "kuadrant.io/dns-health-check-probe"
)
View Source
const (
	DNSRecordFinalizer = "kuadrant.io/dns-record"

	DelegationRolePrimary   = "primary"
	DelegationRoleSecondary = "secondary"
)

Variables

View Source
var (
	ErrInvalidHeader = fmt.Errorf("invalid header format")
)

Functions

func BuildOwnerLabelValue added in v0.7.0

func BuildOwnerLabelValue(record *v1alpha1.DNSRecord) string

BuildOwnerLabelValue ensures label value does not exceed the 63 char limit It uses the name of the record, if the resulting string longer than 63 chars, it will use UIDHash of the record

func GetOwnerFromLabel added in v0.10.0

func GetOwnerFromLabel(probe *v1alpha1.DNSHealthCheckProbe) string

GetOwnerFromLabel returns a name or UID of probe owner A reverse to BuildOwnerLabelValue

Types

type DNSProbeReconciler added in v0.7.0

type DNSProbeReconciler struct {
	client.Client
	Scheme       *runtime.Scheme
	ProbeManager *probes.ProbeManager
}

DNSProbeReconciler reconciles a DNSRecord object

func (*DNSProbeReconciler) Reconcile added in v0.7.0

func (r *DNSProbeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*DNSProbeReconciler) SetupWithManager added in v0.7.0

func (r *DNSProbeReconciler) SetupWithManager(mgr ctrl.Manager, maxRequeue, validForDuration, minRequeue time.Duration) error

SetupWithManager sets up the controller with the Manager.

type DNSRecordAccessor added in v0.15.0

type DNSRecordAccessor interface {
	metav1.Object
	runtime.Object
	v1alpha1.ProviderAccessor
	GetDNSRecord() *v1alpha1.DNSRecord
	GetOwnerID() string
	GetRootHost() string
	GetZoneDomainName() string
	GetZoneID() string
	GetSpec() *v1alpha1.DNSRecordSpec
	GetStatus() *v1alpha1.DNSRecordStatus
	SetStatusCondition(conditionType string, status metav1.ConditionStatus, reason, message string)
	SetStatusZoneID(id string)
	SetStatusZoneDomainName(domainName string)
	SetStatusDomainOwners(owners []string)
	SetStatusEndpoints(endpoints []*externaldns.Endpoint)
	SetStatusObservedGeneration(observedGeneration int64)
	HasOwnerIDAssigned() bool
	HasDNSZoneAssigned() bool
}

type DNSRecordReconciler

type DNSRecordReconciler struct {
	client.Client
	Scheme          *runtime.Scheme
	ProviderFactory provider.Factory
	DelegationRole  string
}

DNSRecordReconciler reconciles a DNSRecord object

func (*DNSRecordReconciler) DeleteHealthChecks added in v0.7.0

func (r *DNSRecordReconciler) DeleteHealthChecks(ctx context.Context, dnsRecord *v1alpha1.DNSRecord) error

DeleteHealthChecks deletes all v1alpha1.DNSHealthCheckProbe that have ProbeOwnerLabel of passed in DNSRecord

func (*DNSRecordReconciler) IsPrimary added in v0.15.0

func (r *DNSRecordReconciler) IsPrimary() bool

func (*DNSRecordReconciler) IsSecondary added in v0.15.0

func (r *DNSRecordReconciler) IsSecondary() bool

func (*DNSRecordReconciler) Reconcile

func (r *DNSRecordReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*DNSRecordReconciler) ReconcileHealthChecks added in v0.2.0

func (r *DNSRecordReconciler) ReconcileHealthChecks(ctx context.Context, dnsRecord *v1alpha1.DNSRecord, allowInsecureCerts bool) error

func (*DNSRecordReconciler) SetupWithManager

func (r *DNSRecordReconciler) SetupWithManager(mgr ctrl.Manager, maxRequeue, validForDuration, minRequeue time.Duration, healthProbesEnabled, allowInsecureHealthCert bool) error

SetupWithManager sets up the controller with the Manager.

type RemoteDNSRecord added in v0.15.0

type RemoteDNSRecord struct {
	*v1alpha1.DNSRecord
	ClusterID string
	// contains filtered or unexported fields
}

func (*RemoteDNSRecord) GetDNSRecord added in v0.15.0

func (s *RemoteDNSRecord) GetDNSRecord() *v1alpha1.DNSRecord

func (*RemoteDNSRecord) GetOwnerID added in v0.15.0

func (s *RemoteDNSRecord) GetOwnerID() string

func (*RemoteDNSRecord) GetSpec added in v0.15.0

func (s *RemoteDNSRecord) GetSpec() *v1alpha1.DNSRecordSpec

func (*RemoteDNSRecord) GetStatus added in v0.15.0

func (s *RemoteDNSRecord) GetStatus() *v1alpha1.DNSRecordStatus

GetStatus returns the status set for the current cluster ID. If none is set an empty DNSRecordStatus is returned.

func (*RemoteDNSRecord) GetZoneDomainName added in v0.15.0

func (s *RemoteDNSRecord) GetZoneDomainName() string

func (*RemoteDNSRecord) GetZoneID added in v0.15.0

func (s *RemoteDNSRecord) GetZoneID() string

func (*RemoteDNSRecord) HasDNSZoneAssigned added in v0.15.0

func (s *RemoteDNSRecord) HasDNSZoneAssigned() bool

func (*RemoteDNSRecord) SetStatusCondition added in v0.15.0

func (s *RemoteDNSRecord) SetStatusCondition(conditionType string, status metav1.ConditionStatus, reason, message string)

func (*RemoteDNSRecord) SetStatusDomainOwners added in v0.15.0

func (s *RemoteDNSRecord) SetStatusDomainOwners(owners []string)

func (*RemoteDNSRecord) SetStatusEndpoints added in v0.15.0

func (s *RemoteDNSRecord) SetStatusEndpoints(endpoints []*externaldns.Endpoint)

func (*RemoteDNSRecord) SetStatusObservedGeneration added in v0.15.0

func (s *RemoteDNSRecord) SetStatusObservedGeneration(observedGeneration int64)

func (*RemoteDNSRecord) SetStatusZoneDomainName added in v0.15.0

func (s *RemoteDNSRecord) SetStatusZoneDomainName(domainName string)

func (*RemoteDNSRecord) SetStatusZoneID added in v0.15.0

func (s *RemoteDNSRecord) SetStatusZoneID(id string)

type RemoteDNSRecordReconciler added in v0.15.0

type RemoteDNSRecordReconciler struct {
	Scheme          *runtime.Scheme
	ProviderFactory provider.Factory
	DelegationRole  string
	// contains filtered or unexported fields
}

RemoteDNSRecordReconciler reconciles a DNSRecord object on a remote cluster.

func (*RemoteDNSRecordReconciler) Reconcile added in v0.15.0

func (*RemoteDNSRecordReconciler) SetupWithManager added in v0.15.0

func (r *RemoteDNSRecordReconciler) SetupWithManager(mgr mcmanager.Manager, skipNameValidation bool) error

SetupWithManager sets up the controller with the Manager.

type SecretConfig added in v0.15.0

type SecretConfig struct {
	Namespace string
	Label     string
}

Jump to

Keyboard shortcuts

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