Documentation
¶
Index ¶
Constants ¶
View Source
const (
// InvalidPodCIDR is the event recorded when a node is found with an
// invalid PodCIDR.
InvalidPodCIDR = "CloudCIDRAllocatorInvalidPodCIDR"
// InvalidModeEvent is the event recorded when the CIDR range cannot be
// sync'd due to the cluster running in the wrong mode.
InvalidModeEvent = "CloudCIDRAllocatorInvalidMode"
// MismatchEvent is the event recorded when the CIDR range allocated in the
// node spec does not match what has been allocated in the cloud.
MismatchEvent = "CloudCIDRAllocatorMismatch"
)
Variables ¶
This section is empty.
Functions ¶
func IsValidMode ¶
func IsValidMode(m NodeSyncMode) bool
IsValidMode returns true if the given mode is valid.
Types ¶
type NodeSync ¶
type NodeSync struct {
// contains filtered or unexported fields
}
NodeSync synchronizes the state for a single node in the cluster.
func New ¶
func New(c controller, cloudAlias cloudAlias, kubeAPI kubeAPI, mode NodeSyncMode, nodeName string, set *cidrset.CidrSet) *NodeSync
New returns a new syncer for a given node.
func (*NodeSync) Delete ¶
func (sync *NodeSync) Delete(node *v1.Node)
Delete performs the sync operations necessary to remove the node from the IPAM state.
This method is safe to call from multiple goroutines.
type NodeSyncMode ¶
type NodeSyncMode string
NodeSyncMode is the mode the cloud CIDR allocator runs in.
var (
// SyncFromCloud is the mode that synchronizes the IP allocation from the cloud
// platform to the node.
SyncFromCloud NodeSyncMode = "SyncFromCloud"
// SyncFromCluster is the mode that synchronizes the IP allocation determined
// by the k8s controller to the cloud provider.
SyncFromCluster NodeSyncMode = "SyncFromCluster"
)
Click to show internal directories.
Click to hide internal directories.