Documentation ¶
Index ¶
Constants ¶
const (
APIServerIdentityLabel = "apiserverIdentity"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PeerAdvertiseAddress ¶
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