controllers

package
v0.0.0-...-54a5547 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ParentDPUServiceIPAMNameLabel points to the name of the DPUServiceIPAM object that owns a resource in the DPU
	// cluster.
	ParentDPUServiceIPAMNameLabel = "dpu.nvidia.com/dpuserviceipam-name"
	// ParentDPUServiceIPAMNamespaceLabel points to the namespace of the DPUServiceIPAM object that owns a resource in
	// the DPU cluster.
	ParentDPUServiceIPAMNamespaceLabel = "dpu.nvidia.com/dpuserviceipam-namespace"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DPUServiceChainReconciler

type DPUServiceChainReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	RemoteCache *dpucluster.RemoteCache
	// contains filtered or unexported fields
}

DPUServiceChainReconciler reconciles a DPUServiceChain object

func (*DPUServiceChainReconciler) DPUClusterToDPUServiceChain

func (r *DPUServiceChainReconciler) DPUClusterToDPUServiceChain(ctx context.Context, o client.Object) []ctrl.Request

DPUClusterToDPUServiceChain ensures all DPUServiceChains are updated each time there is an update to a DPUCluster.

func (*DPUServiceChainReconciler) Reconcile

func (r *DPUServiceChainReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

Reconcile reconciles changes in a DPUServiceChain.

func (*DPUServiceChainReconciler) SetupWithManager

func (r *DPUServiceChainReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type DPUServiceIPAMReconciler

type DPUServiceIPAMReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	RemoteCache *dpucluster.RemoteCache
	// contains filtered or unexported fields
}

DPUServiceIPAMReconciler reconciles a DPUServiceIPAM object

func (*DPUServiceIPAMReconciler) Reconcile

func (r *DPUServiceIPAMReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

Reconcile reconciles changes in a DPUServiceIPAM object

func (*DPUServiceIPAMReconciler) SetupWithManager

func (r *DPUServiceIPAMReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type DPUServiceInterfaceReconciler

type DPUServiceInterfaceReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	RemoteCache *dpucluster.RemoteCache
	// contains filtered or unexported fields
}

DPUServiceInterfaceReconciler reconciles a DPUServiceInterface object

func (*DPUServiceInterfaceReconciler) DPUClusterToDPUServiceInterface

func (r *DPUServiceInterfaceReconciler) DPUClusterToDPUServiceInterface(ctx context.Context, o client.Object) []ctrl.Request

DPUClusterToDPUServiceInterface ensures all DPUServiceInterfaces are updated each time there is an update to a DPUCluster.

func (*DPUServiceInterfaceReconciler) Reconcile

func (r *DPUServiceInterfaceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

Reconcile reconciles changes in a DPUServiceInterface.

func (*DPUServiceInterfaceReconciler) SetupWithManager

func (r *DPUServiceInterfaceReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*DPUServiceInterfaceReconciler) VPCDependenciesToDPUServiceInterface

func (r *DPUServiceInterfaceReconciler) VPCDependenciesToDPUServiceInterface(ctx context.Context, o client.Object) []ctrl.Request

VPCDependenciesToDPUServiceInterface ensures VPC-related DPUServiceInterfaces are reconciled when there is an update to VPC CRs

type DPUServiceNADReconciler

type DPUServiceNADReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	RemoteCache *dpucluster.RemoteCache
	// contains filtered or unexported fields
}

DPUServiceNADReconciler reconciles a DPUServiceNAD object

func (*DPUServiceNADReconciler) Reconcile

func (r *DPUServiceNADReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the DPUServiceNAD object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.19.4/pkg/reconcile

func (*DPUServiceNADReconciler) SetupWithManager

func (r *DPUServiceNADReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type MultiDPUClusterExclusionCalculator

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

MultiDPUClusterExclusionCalculator computes per-DPUCluster exclusion ranges so that the controller can allocate non-overlapping ranges per DPUCluster. It does so by calculating internally the block of IPs that should be assigned per node in each DPUCluster and tries to derive consecutive blocks of such blocks per DPUCluster, taking into account the user provided exclusions.

func NewMultiDPUClusterExclusionCalculatorForCIDRPool

func NewMultiDPUClusterExclusionCalculatorForCIDRPool(
	spec *dpuservicev1.IPV4Network,
	currentDPUClusterAllocations [][]dpuservicev1.IPRange,
) (*MultiDPUClusterExclusionCalculator, error)

NewMultiDPUClusterExclusionCalculatorForCIDRPool creates a calculator from an IPV4Network spec.

func NewMultiDPUClusterExclusionCalculatorForIPPool

func NewMultiDPUClusterExclusionCalculatorForIPPool(
	spec *dpuservicev1.IPV4Subnet,
	currentDPUClusterAllocations [][]dpuservicev1.IPRange,
) (*MultiDPUClusterExclusionCalculator, error)

NewMultiDPUClusterExclusionCalculatorForIPPool creates a calculator from an IPV4Subnet spec.

func (*MultiDPUClusterExclusionCalculator) AllocateClusterBlocks

func (m *MultiDPUClusterExclusionCalculator) AllocateClusterBlocks(existingClusterBlocks []dpuservicev1.IPRange) ([]dpuservicev1.IPRange, error)

AllocateClusterBlocks assigns blocks to the cluster and returns the cluster-blocks to persist in status. Pass nil for a new cluster. Advances the internal pool cursor; call once per cluster per calculator instance. Returns an error when no allocatable blocks remain.

func (*MultiDPUClusterExclusionCalculator) ComputeExclusions

func (m *MultiDPUClusterExclusionCalculator) ComputeExclusions(clusterBlocks []dpuservicev1.IPRange) []nvipamv1.ExcludeRange

ComputeExclusions derives the exclusion ranges for the pool from the given cluster-blocks. The pool must use the parent Network/CIDR for the exclusions to be correct.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL