cluster

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Network []vip.Network
	// contains filtered or unexported fields
}

Cluster - The Cluster object manages the state of the cluster for a particular node

func InitCluster

func InitCluster(c *kubevip.Config, disableVIP bool) (*Cluster, error)

InitCluster - Will attempt to initialise all of the required settings for the cluster

func (*Cluster) StartCluster added in v0.4.0

func (cluster *Cluster) StartCluster(c *kubevip.Config, sm *Manager, bgpServer *bgp.Server) error

StartCluster - Begins a running instance of the Leader Election cluster

func (*Cluster) StartDDNS

func (cluster *Cluster) StartDDNS(ctx context.Context) error

StartDDNS should start go routine for dhclient to hold the lease for the IP StartDDNS should wait until IP is allocated from DHCP, set it to cluster.Network so the OnStartedLeading can continue to configure the VIP initially during runtime if IP changes, startDDNS don't have to do reconfigure because dnsUpdater already have the functionality to keep trying resolve the IP and update the VIP configuration if it changes

func (*Cluster) StartLoadBalancerService

func (cluster *Cluster) StartLoadBalancerService(c *kubevip.Config, bgp *bgp.Server)

StartLoadBalancerService will start a VIP instance and leave it for kube-proxy to handle

func (*Cluster) StartSingleNode

func (cluster *Cluster) StartSingleNode(c *kubevip.Config, disableVIP bool) error

StartSingleNode will start a single node cluster

func (*Cluster) StartVipService added in v0.4.0

func (cluster *Cluster) StartVipService(c *kubevip.Config, sm *Manager, bgp *bgp.Server, packetClient *packngo.Client) error

func (*Cluster) Stop

func (cluster *Cluster) Stop()

Stop - Will stop the Cluster and release VIP if needed

type Manager

type Manager struct {
	KubernetesClient *kubernetes.Clientset
	// This channel is used to signal a shutdown
	SignalChan chan os.Signal

	EtcdClient *clientv3.Client
}

Manager degines the manager of the load-balancing services

func NewManager

func NewManager(path string, inCluster bool, port int) (*Manager, error)

NewManager will create a new managing object

func (*Manager) NodeWatcher added in v0.4.0

func (sm *Manager) NodeWatcher(lb *loadbalancer.IPVSLoadBalancer, port int) error

Jump to

Keyboard shortcuts

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