kubernetes: k8s.io/kubernetes/pkg/controller/nodeipam/ipam/sync Index | Files

package sync

import "k8s.io/kubernetes/pkg/controller/nodeipam/ipam/sync"

Index

Package Files

sync.go

Constants

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"
)

func IsValidMode Uses

func IsValidMode(m NodeSyncMode) bool

IsValidMode returns true if the given mode is valid.

type NodeSync Uses

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

NodeSync synchronizes the state for a single node in the cluster.

func New Uses

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 Uses

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.

func (*NodeSync) Loop Uses

func (sync *NodeSync) Loop(done chan struct{})

Loop runs the sync loop for a given node. done is an optional channel that is closed when the Loop() returns.

func (*NodeSync) Update Uses

func (sync *NodeSync) Update(node *v1.Node)

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.

type NodeSyncMode Uses

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"
)

Package sync imports 7 packages (graph) and is imported by 3 packages. Updated 2019-03-16. Refresh now. Tools for package owners.