host

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCgroups added in v0.1.20

func CheckCgroups(log *slog.Logger) preflight.Checker

CheckCgroups verifies the host cgroup filesystem is available.

func CheckDiskSpace added in v0.1.20

func CheckDiskSpace(log *slog.Logger) preflight.Checker

CheckDiskSpace verifies enough free disk is available for bootstrap.

func CheckDockerActive added in v0.1.20

func CheckDockerActive(log *slog.Logger) preflight.Checker

CheckDockerActive warns when Docker is active.

func CheckExistingDeployment added in v0.1.22

func CheckExistingDeployment(log *slog.Logger) preflight.Checker

CheckExistingDeployment verifies the host does not already contain node deployment artifacts. Bootstrap must start from a clean host; otherwise partial state from a prior run can be reused accidentally.

func CheckHostOSConfiguration added in v0.1.20

func CheckHostOSConfiguration(log *slog.Logger) preflight.Checker

CheckHostOSConfiguration verifies host OS configuration paths are writable.

func CheckHostPackages added in v0.1.20

func CheckHostPackages(log *slog.Logger) preflight.Checker

CheckHostPackages verifies all required host packages are already installed.

func CheckIsPrivilegedUser added in v0.1.20

func CheckIsPrivilegedUser(log *slog.Logger) preflight.Checker

CheckIsPrivilegedUser verifies preflight is running as root.

func CheckNSpawnRuntime added in v0.1.20

func CheckNSpawnRuntime(log *slog.Logger) preflight.Checker

CheckNSpawnRuntime verifies systemd-nspawn runtime tools are available.

func CheckNvidiaDriver added in v0.1.20

func CheckNvidiaDriver(log *slog.Logger) preflight.Checker

CheckNvidiaDriver validates the host NVIDIA driver stack when NVIDIA GPU hardware is present. It is a no-op success on hosts without NVIDIA GPUs.

func CheckSwapActive added in v0.1.20

func CheckSwapActive(log *slog.Logger) preflight.Checker

CheckSwapActive warns when host swap is active.

func ConfigureNFTables

func ConfigureNFTables(log *slog.Logger) phases.Task

ConfigureNFTables returns a task that installs a oneshot systemd unit which flushes all nftables rules to a clean state before kubelet starts. This ensures stale rules (e.g. left behind by Docker) do not interfere with Kubernetes networking.

func ConfigureOS

func ConfigureOS(log *slog.Logger) phases.Task

ConfigureOS returns a task that writes host-level OS configuration (e.g. sysctl tunables) that must be in place before any nspawn machine starts so that kubelet inside the container sees the correct kernel parameter values.

func DisableDocker

func DisableDocker(log *slog.Logger) phases.Task

DisableDocker returns a task that disables the Docker service and configures the Docker daemon with "iptables": false. This prevents Docker from manipulating iptables rules, which would conflict with Kubernetes networking.

func DisableSwap

func DisableSwap(log *slog.Logger) phases.Task

DisableSwap returns a task that disables swap on the host. Kubernetes requires swap to be off so the kubelet memory management and pod QoS guarantees work correctly. The task runs swapoff -a and comments out any swap entries in /etc/fstab so swap stays disabled across reboots. It also masks any active systemd swap units, such as Fedora's zram swap unit, because those are generated outside of /etc/fstab.

func EnsureNoExistingDeployment added in v0.1.22

func EnsureNoExistingDeployment(ctx context.Context, log *slog.Logger) error

EnsureNoExistingDeployment returns an error when the host already contains node deployment artifacts. It is used by start before any bootstrap task mutates host state.

func HardenAPT

func HardenAPT(log *slog.Logger) phases.Task

HardenAPT returns a task that writes drop-ins which prevent unattended-upgrades and needrestart from restarting systemd-machined (and thereby killing the running nspawn container). Idempotent.

func InstallPackages

func InstallPackages(log *slog.Logger) phases.Task

InstallPackages returns a task that installs the required OS packages on the host.

func Preflight added in v0.1.20

Preflight returns the standard host environment checks required before provisioning an nspawn machine.

Types

This section is empty.

Jump to

Keyboard shortcuts

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