reconcilers

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 21 Imported by: 4

Documentation

Index

Constants

View Source
const (
	APIServerIdentityLabel = "apiserverIdentity"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerAdvertiseAddress

type PeerAdvertiseAddress struct {
	PeerAdvertiseIP   string
	PeerAdvertisePort string
}

type PeerEndpointLeaseController

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

PeerEndpointController is the controller manager for updating the peer endpoint leases. This provides a separate independent reconciliation loop for peer endpoint leases which ensures that the peer kube-apiservers are fetching the updated endpoint info for a given apiserver in the case when the peer wants to proxy the request to the given apiserver because it can not serve the request itself due to version mismatch.

func New

func New(serverId string, peeraddress string,
	reconciler PeerEndpointLeaseReconciler, endpointInterval time.Duration, client kubernetes.Interface) *PeerEndpointLeaseController

func (*PeerEndpointLeaseController) Run

func (c *PeerEndpointLeaseController) Run(stopCh <-chan struct{})

RunPeerEndpointReconciler periodically updates the peer endpoint leases

func (*PeerEndpointLeaseController) Start

func (c *PeerEndpointLeaseController) Start(stopCh <-chan struct{})

Start begins the peer endpoint lease reconciler loop that must exist for bootstrapping a cluster.

func (*PeerEndpointLeaseController) Stop

func (c *PeerEndpointLeaseController) Stop()

Stop cleans up this apiserver's peer endpoint leases.

func (*PeerEndpointLeaseController) UpdatePeerEndpointLeases

func (c *PeerEndpointLeaseController) UpdatePeerEndpointLeases() error

UpdatePeerEndpointLeases attempts to update the peer endpoint leases.

type PeerEndpointLeaseReconciler

type PeerEndpointLeaseReconciler interface {
	// GetEndpoint retrieves the endpoint for a given apiserverId
	GetEndpoint(serverId string) (string, error)
	// UpdateLease updates the ip and port of peer servers
	UpdateLease(serverId string, ip string, endpointPorts []corev1.EndpointPort) error
	// RemoveEndpoints removes this apiserver's peer endpoint lease.
	RemoveLease(serverId string) error
	// Destroy cleans up everything on shutdown.
	Destroy()
	// StopReconciling turns any later ReconcileEndpoints call into a noop.
	StopReconciling()
}

func NewPeerEndpointLeaseReconciler

func NewPeerEndpointLeaseReconciler(config *storagebackend.ConfigForResource, baseKey string, leaseTime time.Duration) (PeerEndpointLeaseReconciler, error)

NewPeerEndpointLeaseReconciler creates a new peer endpoint lease reconciler

Jump to

Keyboard shortcuts

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