Documentation
¶
Index ¶
- func ConfigureContainerd(goalState *goalstates.NodeStart) phases.Task
- func ConfigureKubelet(goalState *goalstates.NodeStart) phases.Task
- func SetupNVIDIA(log *slog.Logger, goalState *goalstates.NodeStart) phases.Task
- func StartContainerd(log *slog.Logger, goalState *goalstates.NodeStart) phases.Task
- func StartKubelet(log *slog.Logger, goalState *goalstates.NodeStart) phases.Task
- func StartNSpawnMachine(log *slog.Logger, goalState *goalstates.NodeStart) phases.Task
- func StartNode(log *slog.Logger, gs *goalstates.NodeStart) phases.Task
- func WaitForKubelet(log *slog.Logger, machineName string) phases.Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureContainerd ¶
func ConfigureContainerd(goalState *goalstates.NodeStart) phases.Task
ConfigureContainerd returns a task that writes the containerd configuration, systemd unit, and optional GPU drop-in configs into the machine rootfs. It runs before the nspawn machine is started, so all paths are relative to the machine directory on the host filesystem.
func ConfigureKubelet ¶
func ConfigureKubelet(goalState *goalstates.NodeStart) phases.Task
ConfigureKubelet returns a task that writes the kubelet configuration into the machine rootfs. It runs before the nspawn machine is started, so all paths are relative to the machine directory on the host filesystem.
func SetupNVIDIA ¶
SetupNVIDIA returns a task that makes NVIDIA driver libraries from the host accessible inside the running nspawn machine and generates a CDI specification describing the available GPUs.
The task performs three steps in sequence:
- Creates symlinks in the container's standard library path pointing into the bind-mounted /run/host-nvidia/ directories, then runs ldconfig.
- Ensures the CDI spec directory exists.
- Runs nvidia-ctk cdi generate inside the machine to produce the CDI spec at /etc/cdi/nvidia.yaml. Most hooks are disabled because they interfere with the nspawn environment (e.g. mounting tmpfs over /proc paths, CUDA compat hooks on NVSwitch systems). Only create-symlinks and update-ldcache are retained.
This task must run after StartNSpawnMachine (the machine must be booted and the /run/host-nvidia/ bind mounts must be active) and before StartKubelet (so pods can use GPUs immediately).
The task is a no-op when the NVIDIA runtime is not enabled or no library mappings were discovered on the host.
func StartContainerd ¶
StartContainerd returns a task that enables and starts the containerd systemd service inside the running nspawn machine.
func StartKubelet ¶
StartKubelet returns a task that enables and starts the kubelet systemd service inside the running nspawn machine.
func StartNSpawnMachine ¶
StartNSpawnMachine returns a task that starts the systemd-nspawn machine using machinectl and waits until D-Bus is responsive inside the machine so that subsequent phases can safely use utilexec.MachineRun().
func StartNode ¶
StartNode returns a composite task that configures and starts an nspawn machine node: configuring containerd and kubelet in parallel, then starting the nspawn machine, setting up NVIDIA (if applicable), starting containerd and kubelet in sequence.
This is the shared node-start sequence used by both the initial agent start and node update flows. Callers that need to persist the applied config for drift detection should append that step separately.
Types ¶
This section is empty.