common

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultContainerdEndpoint    = "unix:///run/containerd/containerd.sock"
	DefaultContainerdConfigPath  = "/etc/containerd/config.toml"
	DefaultContainerdServiceName = "containerd"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerdConfig added in v0.13.0

type ContainerdConfig struct {
	// Use unix:///run/k3s/containerd/containerd.sock for RKE2/k3s.
	Endpoint string `json:"endpoint,omitempty"`
	// Use /var/lib/rancher/rke2/agent/etc/containerd/config.toml for RKE2.
	ConfigPath string `json:"config_path,omitempty"`
	// Use rke2-agent for RKE2 workers, or rke2-server for RKE2 servers.
	ServiceName string `json:"service_name,omitempty"`
	// Optional command prefix, e.g. nsenter --target 1 --mount -- systemctl.
	// Both activeness and uptime must query the same service manager.
	SystemctlCommands string `json:"systemctl_commands,omitempty"`
}

ContainerdConfig selects one runtime installation. The zero value preserves legacy runtime detection; an explicit configuration must never fall back to another runtime when the selected runtime is unavailable.

func (ContainerdConfig) IsZero added in v0.13.0

func (c ContainerdConfig) IsZero() bool

func (ContainerdConfig) SocketPath added in v0.13.0

func (c ContainerdConfig) SocketPath() (string, error)

func (ContainerdConfig) Validate added in v0.13.0

func (c ContainerdConfig) Validate() error

Validate checks syntax only: the socket may be absent during a runtime outage.

func (ContainerdConfig) WithDefaults added in v0.13.0

func (c ContainerdConfig) WithDefaults() ContainerdConfig

type ToolOverwrites

type ToolOverwrites struct {
	InfinibandClassRootDir string `json:"infiniband_class_root_dir"`

	// ExcludedInfinibandDevices is a list of InfiniBand device names to exclude from monitoring.
	// Device names should be like "mlx5_0", "mlx5_1", etc. (not full paths).
	//
	// This is useful for excluding devices that have restricted Physical Functions (PFs)
	// and cause kernel errors (mlx5_cmd_out_err ACCESS_REG) when queried.
	// This is common on NVIDIA DGX, Umbriel, and GB200 systems with ConnectX-7 adapters
	// where some ports are managed by system firmware.
	//
	// Example: ["mlx5_0", "mlx5_1"]
	//
	// ref.
	// https://github.com/prometheus/node_exporter/issues/3434
	// https://github.com/leptonai/gpud/issues/1164
	ExcludedInfinibandDevices []string `json:"excluded_infiniband_devices"`
}

Jump to

Keyboard shortcuts

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