assistant

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assistant

type Assistant interface {
	// CoreDNSExposedIPs retrieves list of exposed IP by CoreDNS
	CoreDNSExposedIPs() ([]string, error)
	// GslbIngressExposedIPs retrieves list of IP's exposed by all GSLB ingresses
	GslbIngressExposedIPs(gslb *k8gbv1beta1.Gslb) ([]string, error)
	// GetExternalTargets retrieves slice of targets from external clusters
	GetExternalTargets(host string, extClusterNsNames map[string]string) (targets Targets)
	// SaveDNSEndpoint update DNS endpoint or create new one if doesnt exist
	SaveDNSEndpoint(namespace string, i *externaldns.DNSEndpoint) error
	// RemoveEndpoint removes endpoint
	RemoveEndpoint(endpointName string) error
	// InspectTXTThreshold inspects fqdn TXT record from edgeDNSServer. If record doesn't exists or timestamp is greater than
	// splitBrainThreshold the error is returned. In case fakeDNSEnabled is true, 127.0.0.1:7753 is used as edgeDNSServer
	InspectTXTThreshold(fqdn string, splitBrainThreshold time.Duration) error
}

type Gslb

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

Gslb is common wrapper operating on GSLB instance. It uses apimachinery client to call kubernetes API

func NewGslbAssistant

func NewGslbAssistant(client client.Client, k8gbNamespace string, edgeDNSServers []utils.DNSServer) *Gslb

func (*Gslb) CoreDNSExposedIPs

func (r *Gslb) CoreDNSExposedIPs() ([]string, error)

CoreDNSExposedIPs retrieves list of IP's exposed by CoreDNS

func (*Gslb) GetExternalTargets

func (r *Gslb) GetExternalTargets(host string, extClusterNsNames map[string]string) (targets Targets)

func (*Gslb) GslbIngressExposedIPs

func (r *Gslb) GslbIngressExposedIPs(gslb *k8gbv1beta1.Gslb) ([]string, error)

GslbIngressExposedIPs retrieves list of IP's exposed by all GSLB ingresses

func (*Gslb) InspectTXTThreshold

func (r *Gslb) InspectTXTThreshold(fqdn string, splitBrainThreshold time.Duration) error

InspectTXTThreshold inspects fqdn TXT record from edgeDNSServer. If record doesn't exists or timestamp is greater than splitBrainThreshold the error is returned.

func (*Gslb) RemoveEndpoint

func (r *Gslb) RemoveEndpoint(endpointName string) error

RemoveEndpoint removes endpoint

func (*Gslb) SaveDNSEndpoint

func (r *Gslb) SaveDNSEndpoint(namespace string, i *externaldns.DNSEndpoint) error

SaveDNSEndpoint update DNS endpoint or create new one if doesnt exist

type Target added in v0.10.0

type Target struct {
	IPs []string
}

type Targets added in v0.10.0

type Targets map[string]*Target

func NewTargets added in v0.10.0

func NewTargets() Targets

func (Targets) Append added in v0.10.0

func (t Targets) Append(tag string, ips []string)

func (Targets) AppendTargets added in v0.10.0

func (t Targets) AppendTargets(targets Targets)

func (Targets) GetIPs added in v0.10.0

func (t Targets) GetIPs() (ips []string)

func (Targets) Sort added in v0.10.0

func (t Targets) Sort()

Jump to

Keyboard shortcuts

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