dpunode

package
v0.1.0-latest-stable Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 34 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// controller name that will be used when
	DPUNodeControllerName              = "dpunode"
	PodTemplateConfigMapKey     string = "pod-template"
	PodInfoVolumeName           string = "dpf-pod-info"
	PodInfoMountPath            string = "/etc/dpf-pod-info"
	PodInfoLabelsPath           string = "labels"
	PodInfoAnnotationsPath      string = "annotations"
	PodInfoLabelsFieldPath      string = "metadata.labels"
	PodInfoAnnotationsFieldPath string = "metadata.annotations"
	DPUNodeNameEnvVar           string = "DPUNODE_NAME"

	// DPUNodeRebootMethodEnvVar holds the aggregated host reboot method
	// (highest-priority winner across DPUs in DPURebooting phase), injected
	// into custom-script reboot pods. Values mirror provisioningv1.RebootMethodType,
	// with SystemLevelReset substituted when no DPU has reported yet (or all
	// report Unknown) so the script always has an actionable signal. Mirrors
	// DPUNode.Status.RebootMethod.
	DPUNodeRebootMethodEnvVar string = "DPUNODE_REBOOT_METHOD"
	// DPUNodeRebootMethodsPerDPUEnvVar is the env var name injected into
	// custom-script reboot pods that holds a comma-separated <dpu-name>=<method>
	// mapping for every DPU associated with the DPUNode, sorted by DPU name.
	// DPUs that have not reported a RebootMethod yet appear as "<dpu-name>=Unknown".
	DPUNodeRebootMethodsPerDPUEnvVar string = "DPUNODE_REBOOT_METHODS_PER_DPU"
	// DPUNodeRebootMethodAnnotation mirrors DPUNodeRebootMethodEnvVar as a
	// pod-template annotation, exposed inside the pod through the existing
	// dpf-pod-info downward-API mount at /etc/dpf-pod-info/annotations.
	DPUNodeRebootMethodAnnotation string = cutil.DPUProvisioningPrefix + "reboot-method-aggregated"
	// DPUNodeRebootMethodsPerDPUAnnotation mirrors
	// DPUNodeRebootMethodsPerDPUEnvVar as a pod-template annotation.
	DPUNodeRebootMethodsPerDPUAnnotation string = cutil.DPUProvisioningPrefix + "reboot-methods-per-dpu"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DPUNodeReconciler

type DPUNodeReconciler struct {
	client.Client
	DPUInstallInterface *string
	// Options are the Options used to configure the DMS Pods created by the controller.
	Options dnutil.HostAgentPodOptions
	// Recorder is an event recorder that is used to record events that occur during the execution of the controller.
	Recorder record.EventRecorder
}

DPUNodeReconciler reconciles a DPUNode object

func (*DPUNodeReconciler) HandleRebootSync

func (r *DPUNodeReconciler) HandleRebootSync(ctx context.Context, dpuNode *provisioningv1.DPUNode, dpuPhases map[string]struct{}) (ctrl.Result, error)

HandleRebootSync drives the External and Script reboot paths and publishes Status.RebootMethod when at least one DPU is in DPURebooting. dpuPhases is the phase snapshot from Reconcile, reused to avoid a duplicate Spec.DPUs walk.

func (*DPUNodeReconciler) Reconcile

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

func (*DPUNodeReconciler) SetupWithManager

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

type NodeReconciler

type NodeReconciler struct {
	client.Client
	Options dnutil.HostAgentPodOptions
}

func (*NodeReconciler) Reconcile

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

func (*NodeReconciler) SetupWithManager

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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