discovery

package
v0.3.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package discovery implements the logic of the discovery of other clusters, both on local networks and in wide area networks

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthData

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

AuthData contains the information exchanged with the discovery methods on how to contact a remote Authentication Service.

func NewAuthData

func NewAuthData(address string, port int, ttl uint32) *AuthData

NewAuthData creates a new AuthData struct.

func (*AuthData) Get

func (authData *AuthData) Get(discovery *Controller, entry *zeroconf.ServiceEntry) error

Get decodes and populates the AuthData struct given a discovery Controller and a DNS entry.

func (*AuthData) IsComplete

func (authData *AuthData) IsComplete() bool

IsComplete checks if both address and port are correctly set.

type ConfigProvider

type ConfigProvider interface {
	GetConfig() *configv1alpha1.DiscoveryConfig
	GetAPIServerConfig() *configv1alpha1.APIServerConfig
}

ConfigProvider interface provides methods to access the Discovery and API Server configuration.

type Controller added in v0.3.0

type Controller struct {
	Namespace string

	Config *configv1alpha1.DiscoveryConfig

	LocalClusterID clusterid.ClusterID
	// contains filtered or unexported fields
}

Controller is the controller for the discovery functionalities.

func NewDiscoveryCtrl

func NewDiscoveryCtrl(
	namespace string, localClusterID clusterid.ClusterID, kubeconfigPath string,
	resolveContextRefreshTime int, dialTCPTimeout time.Duration) (*Controller, error)

NewDiscoveryCtrl returns a new discovery controller.

func (*Controller) GetAPIServerConfig

func (discovery *Controller) GetAPIServerConfig() *configv1alpha1.APIServerConfig

GetAPIServerConfig returns the configuration of the local APIServer (address, port).

func (*Controller) GetAuthConfig

func (discovery *Controller) GetAuthConfig() *configv1alpha1.AuthConfig

GetAuthConfig returns the authentication configuration.

func (*Controller) GetConfig

func (discovery *Controller) GetConfig() *configv1alpha1.DiscoveryConfig

GetConfig returns the configuration of the discovery component.

func (*Controller) StartDiscovery

func (discovery *Controller) StartDiscovery()

StartDiscovery starts register and resolver goroutines.

func (*Controller) UpdateForeignWAN added in v0.3.0

func (discovery *Controller) UpdateForeignWAN(data []*AuthData, sd *v1alpha1.SearchDomain) []*v1alpha1.ForeignCluster

UpdateForeignWAN updates the list of known foreign clusters: for each cluster retrieved with DNS discovery, if it is not the local cluster, check if it is already known, if not create it. In both cases update the ForeignCluster TTL This function also sets an owner reference and a label to the ForeignCluster pointing to the SearchDomain CR.

Directories

Path Synopsis
Package foreignclusteroperator implements the logic of the ForeignCluster Operator
Package foreignclusteroperator implements the logic of the ForeignCluster Operator
Package searchdomainoperator implements the logic of the SearchDomain Operator
Package searchdomainoperator implements the logic of the SearchDomain Operator
Package utils contains functions useful for the discovery component, in particular during the communications with a remote cluster.
Package utils contains functions useful for the discovery component, in particular during the communications with a remote cluster.

Jump to

Keyboard shortcuts

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