syncers

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 25 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MAX_NETWORK_ENDPOINTS_PER_BATCH = 500
)

Variables

View Source
var ErrHandlerRetrying = fmt.Errorf("retry handler is retrying")
View Source
var ErrRetriesExceeded = fmt.Errorf("maximum retry exceeded")

Functions

func GetEndpointsCalculator added in v1.9.0

func GetEndpointsCalculator(nodeLister, podLister cache.Indexer, zoneGetter negtypes.ZoneGetter, syncerKey negtypes.NegSyncerKey, randomizeEndpoints bool) negtypes.NetworkEndpointsCalculator

func NewDelayRetryHandler added in v1.5.0

func NewDelayRetryHandler(retryFunc func(), backoff backoffHandler) *backoffRetryHandler

func NewExponentialBackendOffHandler added in v1.5.0

func NewExponentialBackendOffHandler(maxRetries int, minRetryDelay, maxRetryDelay time.Duration) *exponentialBackOffHandler

func NewTransactionSyncer added in v1.5.0

func NewTransactionSyncer(negSyncerKey negtypes.NegSyncerKey, networkEndpointGroupName string, recorder record.EventRecorder, cloud negtypes.NetworkEndpointGroupCloud, zoneGetter negtypes.ZoneGetter, podLister cache.Indexer, serviceLister cache.Indexer, endpointLister cache.Indexer, nodeLister cache.Indexer, reflector readiness.Reflector, epc negtypes.NetworkEndpointsCalculator) negtypes.NegSyncer

func NewTransactionTable added in v1.5.0

func NewTransactionTable() networkEndpointTransactionTable

Types

type ByNodeCount added in v1.9.0

type ByNodeCount []ZoneInfo

ByNodeCount implements sort.Interface for []ZoneInfo based on the node count.

func (ByNodeCount) Len added in v1.9.0

func (a ByNodeCount) Len() int

func (ByNodeCount) Less added in v1.9.0

func (a ByNodeCount) Less(i, j int) bool

func (ByNodeCount) Swap added in v1.9.0

func (a ByNodeCount) Swap(i, j int)

type ClusterL4ILBEndpointsCalculator added in v1.9.0

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

ClusterL4ILBEndpointGetter implements the NetworkEndpointsCalculator interface. It exposes methods to calculate Network endpoints for GCE_VM_IP NEGs when the service uses "ExternalTrafficPolicy: Cluster" mode This is the default mode. In this mode, the endpoints of the NEG are calculated by selecting nodes at random. Upto 25(subset size limit in this mode) are selected.

func NewClusterL4ILBEndpointsCalculator added in v1.9.0

func NewClusterL4ILBEndpointsCalculator(nodeLister listers.NodeLister, zoneGetter types.ZoneGetter, svcId string) *ClusterL4ILBEndpointsCalculator

func (*ClusterL4ILBEndpointsCalculator) CalculateEndpoints added in v1.9.0

CalculateEndpoints determines the endpoints in the NEGs based on the current service endpoints and the current NEGs.

func (*ClusterL4ILBEndpointsCalculator) Mode added in v1.9.0

Mode indicates the mode that the EndpointsCalculator is operating in.

type L7EndpointsCalculator added in v1.9.0

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

L7EndpointsCalculator implements methods to calculate Network endpoints for VM_IP_PORT NEGs

func NewL7EndpointsCalculator added in v1.9.0

func NewL7EndpointsCalculator(zoneGetter types.ZoneGetter, podLister cache.Indexer, svcPortName, subsetLabels string, endpointType types.NetworkEndpointType) *L7EndpointsCalculator

func (*L7EndpointsCalculator) CalculateEndpoints added in v1.9.0

CalculateEndpoints determines the endpoints in the NEGs based on the current service endpoints and the current NEGs.

func (*L7EndpointsCalculator) Mode added in v1.9.0

Mode indicates the mode that the EndpointsCalculator is operating in.

type LocalL4ILBEndpointsCalculator added in v1.9.0

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

LocalL4ILBEndpointGetter implements the NetworkEndpointsCalculator interface. It exposes methods to calculate Network endpoints for GCE_VM_IP NEGs when the service uses "ExternalTrafficPolicy: Local" mode. In this mode, the endpoints of the NEG are calculated by listing the nodes that host the service endpoints(pods) for the given service. These candidate nodes picked as is, if the count is less than the subset size limit(250). Otherwise, a subset of nodes is selected. In a cluster with nodes node1... node 50. If nodes node10 to node 45 run the pods for a given ILB service, all these nodes - node10, node 11 ... node45 will be part of the subset.

func NewLocalL4ILBEndpointsCalculator added in v1.9.0

func NewLocalL4ILBEndpointsCalculator(nodeLister listers.NodeLister, zoneGetter types.ZoneGetter, svcId string) *LocalL4ILBEndpointsCalculator

func (*LocalL4ILBEndpointsCalculator) CalculateEndpoints added in v1.9.0

CalculateEndpoints determines the endpoints in the NEGs based on the current service endpoints and the current NEGs.

func (*LocalL4ILBEndpointsCalculator) Mode added in v1.9.0

Mode indicates the mode that the EndpointsCalculator is operating in.

type NodeInfo added in v1.9.0

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

NodeInfo stores node metadata used to sort nodes and pick a subset.

type ZoneInfo added in v1.9.0

type ZoneInfo struct {
	Name      string
	NodeCount int
}

ZoneInfo contains the name and number of nodes for a particular zone. this struct is used for sorting zones according to node count.

func (ZoneInfo) String added in v1.9.0

func (z ZoneInfo) String() string

Jump to

Keyboard shortcuts

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