Documentation ¶
Index ¶
Constants ¶
View Source
const (
// The max no. of NodeSpec updates that can be enqueued.
CidrUpdateQueueSize = 5000
)
TODO: figure out the good setting for those constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CIDRAllocator ¶
type CIDRAllocator interface { // AllocateOrOccupyCIDR looks at the given node, assigns it a valid // CIDR if it doesn't currently have one or mark the CIDR as used if // the node already have one. AllocateOrOccupyCIDR(node *v1.Node) error // ReleaseCIDR releases the CIDR of the removed node ReleaseCIDR(node *v1.Node) error // Run starts all the working logic of the allocator. Run(ctx context.Context, stopCh <-chan struct{}) ReadyChecker(_ *http.Request) error HealthzChecker(_ *http.Request) error }
CIDRAllocator is an interface implemented by things that know how to allocate/occupy/recycle CIDR for nodes.
func NewCIDRRangeAllocator ¶
func NewCIDRRangeAllocator(ctx context.Context, client *coreV1Client.CoreV1Client, ec2Client *ec2.Client, allocatorParams CIDRAllocatorParams, nodeInformer runtimecache.Informer, mode string, tickPeriod *time.Duration, nodeCIDRMaskSizeIPv6 int) (CIDRAllocator, error)
NewCIDRRangeAllocator returns a CIDRAllocator to allocate CIDRs for node (one from each of clusterCIDRs) Caller must ensure subNetMaskSize is not less than cluster CIDR mask size. Caller must always pass in a list of existing nodes so the new allocator. can initialize its CIDR map. NodeList is only nil in testing.
type CIDRAllocatorParams ¶
type CIDRAllocatorParams struct { // ClusterCIDRs is list of cluster cidrs ClusterCIDRs []*net.IPNet // NodeCIDRMaskSizes is list of node cidr mask sizes NodeCIDRMaskSizes []int }
CIDRAllocatorParams is parameters that's required for creating new cidr range allocator.
type NodeReservedCIDRs ¶
type NodeReservedCIDRs struct {
// contains filtered or unexported fields
}
NodeReservedCIDRs holds the allocated CIDRs
Click to show internal directories.
Click to hide internal directories.