Documentation ¶
Index ¶
- Constants
- Variables
- func GetEndpointsCalculator(nodeLister, podLister cache.Indexer, zoneGetter negtypes.ZoneGetter, ...) negtypes.NetworkEndpointsCalculator
- func NewDelayRetryHandler(retryFunc func(), backoff backoffHandler) *backoffRetryHandler
- func NewExponentialBackendOffHandler(maxRetries int, minRetryDelay, maxRetryDelay time.Duration) *exponentialBackOffHandler
- func NewTransactionSyncer(negSyncerKey negtypes.NegSyncerKey, networkEndpointGroupName string, ...) negtypes.NegSyncer
- func NewTransactionTable() networkEndpointTransactionTable
- type ByNodeCount
- type ClusterL4ILBEndpointsCalculator
- type L7EndpointsCalculator
- type LocalL4ILBEndpointsCalculator
- type NodeInfo
- type ZoneInfo
Constants ¶
const (
MAX_NETWORK_ENDPOINTS_PER_BATCH = 500
)
Variables ¶
var ErrHandlerRetrying = fmt.Errorf("retry handler is retrying")
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 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
func (l *ClusterL4ILBEndpointsCalculator) CalculateEndpoints(ep *v1.Endpoints, currentMap map[string]types.NetworkEndpointSet) (map[string]types.NetworkEndpointSet, types.EndpointPodMap, error)
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
func (l *ClusterL4ILBEndpointsCalculator) Mode() types.EndpointsCalculatorMode
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
func (l *L7EndpointsCalculator) CalculateEndpoints(ep *v1.Endpoints, currentMap map[string]types.NetworkEndpointSet) (map[string]types.NetworkEndpointSet, types.EndpointPodMap, error)
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
func (l *L7EndpointsCalculator) Mode() types.EndpointsCalculatorMode
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
func (l *LocalL4ILBEndpointsCalculator) CalculateEndpoints(ep *v1.Endpoints, currentMap map[string]types.NetworkEndpointSet) (map[string]types.NetworkEndpointSet, types.EndpointPodMap, error)
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
func (l *LocalL4ILBEndpointsCalculator) Mode() types.EndpointsCalculatorMode
Mode indicates the mode that the EndpointsCalculator is operating in.