system

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHostname

func GetHostname() string

GetHostname returns the hostname of the machine it returns the hostname of the machine if it fails, it uses the default value "kubesolo-node"

func IsRunningInContainer added in v1.1.7

func IsRunningInContainer() bool

IsRunningInContainer detects if the process is running inside a container by checking for common container indicators

func LoadRequiredModules added in v1.1.3

func LoadRequiredModules()

LoadRequiredModules attempts to load kernel modules required by Kubernetes networking components. Detects whether the host uses nf_tables or legacy iptables and loads the appropriate backend modules, plus xtables match/target modules needed by the CNI bridge plugin in both cases. Failures are logged as warnings and do not prevent startup — the module may be built-in or simply unavailable.

func SetupContainerCgroups added in v1.1.7

func SetupContainerCgroups() error

SetupContainerCgroups prepares cgroup v2 for running nested containers. In cgroupv2, a cgroup cannot both contain processes AND have domain controllers delegated to child cgroups (the "no internal processes" rule). This function creates a child cgroup (/sys/fs/cgroup/init), moves the current process into it, and enables controller delegation on the root cgroup so that containerd/runc can create child cgroups (like /sys/fs/cgroup/k8s.io).

func SetupContainerMounts added in v1.1.7

func SetupContainerMounts() error

SetupContainerMounts ensures mount propagation is set to rshared on the root filesystem. Without this, kubelet cannot propagate volume mounts (including projected service account tokens) into pod containers.

func StartMonitoring

func StartMonitoring()

StartMonitoring starts the system monitoring services including pprof and memory monitoring

Types

This section is empty.

Jump to

Keyboard shortcuts

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