kubernetesk8s.io/kubernetes/pkg/master/reconcilers Index | Files

package reconcilers

import "k8s.io/kubernetes/pkg/master/reconcilers"

Package reconcilers provides objects for managing the list of active masters. NOTE: The Lease reconciler is not the intended way for any apiserver other than kube-apiserver to accomplish the task of Endpoint registration. This is a special case for the time being.

Package reconcilers master count based reconciler

Package reconcilers a noop based reconciler

Package reconcilers Endpoint Reconcilers for the apiserver

Index

Constants

const (
	// MasterCountReconcilerType will select the original reconciler
	MasterCountReconcilerType Type = "master-count"
	// LeaseEndpointReconcilerType will select a storage based reconciler
	LeaseEndpointReconcilerType = "lease"
	// NoneEndpointReconcilerType will turn off the endpoint reconciler
	NoneEndpointReconcilerType = "none"
)

Variables

var AllTypes = Types{
	MasterCountReconcilerType,
	LeaseEndpointReconcilerType,
	NoneEndpointReconcilerType,
}

AllTypes export all reconcilers

Functions

func GetMasterServiceUpdateIfNeeded

func GetMasterServiceUpdateIfNeeded(svc *api.Service, servicePorts []api.ServicePort, serviceType api.ServiceType) (s *api.Service, updated bool)

GetMasterServiceUpdateIfNeeded sets service attributes for the

given apiserver service.

Requirements:

Types

type EndpointReconciler

type EndpointReconciler interface {
	// ReconcileEndpoints sets the endpoints for the given apiserver service (ro or rw).
	// ReconcileEndpoints expects that the endpoints objects it manages will all be
	// managed only by ReconcileEndpoints; therefore, to understand this, you need only
	// understand the requirements.
	//
	// Requirements:
	//  * All apiservers MUST use the same ports for their {rw, ro} services.
	//  * All apiservers MUST use ReconcileEndpoints and only ReconcileEndpoints to manage the
	//      endpoints for their {rw, ro} services.
	//  * ReconcileEndpoints is called periodically from all apiservers.
	ReconcileEndpoints(serviceName string, ip net.IP, endpointPorts []api.EndpointPort, reconcilePorts bool) error
	StopReconciling(serviceName string, ip net.IP, endpointPorts []api.EndpointPort) error
}

EndpointReconciler knows how to reconcile the endpoints for the apiserver service.

func NewLeaseEndpointReconciler

func NewLeaseEndpointReconciler(endpointStorage rest.StandardStorage, masterLeases Leases) EndpointReconciler

NewLeaseEndpointReconciler creates a new LeaseEndpoint reconciler

func NewMasterCountEndpointReconciler

func NewMasterCountEndpointReconciler(masterCount int, endpointClient coreclient.EndpointsGetter) EndpointReconciler

NewMasterCountEndpointReconciler creates a new EndpointReconciler that reconciles based on a specified expected number of masters.

func NewNoneEndpointReconciler

func NewNoneEndpointReconciler() EndpointReconciler

NewNoneEndpointReconciler creates a new EndpointReconciler that reconciles based on a nothing. It is a no-op.

type Leases

type Leases interface {
	// ListLeases retrieves a list of the current master IPs
	ListLeases() ([]string, error)

	// UpdateLease adds or refreshes a master's lease
	UpdateLease(ip string) error

	// RemoveLease removes a master's lease
	RemoveLease(ip string) error
}

Leases is an interface which assists in managing the set of active masters

func NewLeases

func NewLeases(storage storage.Interface, baseKey string, leaseTime time.Duration) Leases

NewLeases creates a new etcd-based Leases implementation.

type Type

type Type string

Type the reconciler type

type Types

type Types []Type

Types an array of reconciler types

func (Types) Names

func (t Types) Names() []string

Names returns a slice of all the reconciler names

Source Files

doc.go lease.go mastercount.go none.go reconcilers.go

Version
v1.12.6
Published
Feb 26, 2019
Platform
js/wasm
Imports
16 packages
Last checked
1 hour ago

Tools for package owners.