kubernetes/pkg/controller/nodeipam/ipam/sync/sync.go

const InvalidPodCIDR

const InvalidModeEvent

const MismatchEvent

type cloudAlias

type kubeAPI

type controller

type NodeSyncMode

var SyncFromCloud

var SyncFromCluster

// IsValidMode returns true if the given mode is valid.
func IsValidMode(m NodeSyncMode) bool {}

type NodeSync

// New returns a new syncer for a given node.
func New(c controller, cloudAlias cloudAlias, kubeAPI kubeAPI, mode NodeSyncMode, nodeName string, set *cidrset.CidrSet) *NodeSync {}

// Loop runs the sync loop for a given node. done is an optional channel that
// is closed when the Loop() returns.
func (sync *NodeSync) Loop(logger klog.Logger, done chan struct{}

// Update causes an update operation on the given node. If node is nil, then
// the syncer will fetch the node spec from the API server before syncing.
//
// This method is safe to call from multiple goroutines.
func (sync *NodeSync) Update(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.
func (sync *NodeSync) Delete(node *v1.Node) {}

type syncOp

type updateOp

func (op *updateOp) String() string {}

func (op *updateOp) run(logger klog.Logger, sync *NodeSync) error {}

// validateRange checks that the allocated range and the alias range
// match.
func (op *updateOp) validateRange(ctx context.Context, sync *NodeSync, node *v1.Node, aliasRange *net.IPNet) error {}

// updateNodeFromAlias updates the node from the cloud allocated
// alias.
func (op *updateOp) updateNodeFromAlias(ctx context.Context, sync *NodeSync, node *v1.Node, aliasRange *net.IPNet) error {}

// updateAliasFromNode updates the cloud alias given the node allocation.
func (op *updateOp) updateAliasFromNode(ctx context.Context, sync *NodeSync, node *v1.Node) error {}

// allocateRange allocates a new range and updates both the cloud
// platform and the node allocation.
func (op *updateOp) allocateRange(ctx context.Context, sync *NodeSync, node *v1.Node) error {}

type deleteOp

func (op *deleteOp) String() string {}

func (op *deleteOp) run(logger klog.Logger, sync *NodeSync) error {}