kubernetesk8s.io/kubernetes/pkg/controller/nodeipam Index | Files | Directories

package nodeipam

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

Package nodeipam contains code for syncing cloud instances with node registry

Index

Types

type Controller

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

Controller is the controller that manages node ipam state.

func NewNodeIpamController

func NewNodeIpamController(
	ctx context.Context,
	nodeInformer coreinformers.NodeInformer,
	cloud cloudprovider.Interface,
	kubeClient clientset.Interface,
	clusterCIDRs []*net.IPNet,
	serviceCIDR *net.IPNet,
	secondaryServiceCIDR *net.IPNet,
	nodeCIDRMaskSizes []int,
	allocatorType ipam.CIDRAllocatorType) (*Controller, error)

NewNodeIpamController returns a new node IP Address Management controller to sync instances from cloudprovider. This method returns an error if it is unable to initialize the CIDR bitmap with podCIDRs it has already allocated to nodes. Since we don't allow podCIDR changes currently, this should be handled as a fatal error.

func (*Controller) Run

func (nc *Controller) Run(ctx context.Context)

Run starts an asynchronous loop that monitors the status of cluster nodes.

func (*Controller) RunWithMetrics

func (nc *Controller) RunWithMetrics(ctx context.Context, controllerManagerMetrics *controllersmetrics.ControllerManagerMetrics)

RunWithMetrics is a wrapper for Run that also tracks starting and stopping of the nodeipam controller with additional metric

Source Files

doc.go node_ipam_controller.go nolegacyprovider.go

Directories

PathSynopsis
pkg/controller/nodeipam/config
pkg/controller/nodeipam/config/v1alpha1
pkg/controller/nodeipam/ipamPackage ipam provides different allocators for assigning IP ranges to nodes.
pkg/controller/nodeipam/ipam/cidrset
pkg/controller/nodeipam/ipam/sync
pkg/controller/nodeipam/ipam/test
Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
15 packages
Last checked
3 hours ago

Tools for package owners.