system

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UbuntuOsName = "ubuntu"
	RhelOsName   = "rhel"
	AmazonOsName = "amzn"

	UbuntuResolvConfPath = "/run/systemd/resolve/resolv.conf"
)

Variables

This section is empty.

Functions

func GetFipsInfo

func GetFipsInfo() (bool, bool, error)

Returns whether FIPS module is both installed an enabled on the system

ipsInstalled, fipsEnabled, err := getFipsInfo()

func GetMachineMemoryCapacity

func GetMachineMemoryCapacity() (uint64, error)

GetMachineMemoryCapacity returns the machine's total memory from /proc/meminfo. Returns the total memory capacity as number of bytes.

func GetMilliNumCores

func GetMilliNumCores() (int, error)

GetMilliNumCores this is a striped version of GetNodesInfo that only get information for NumCores https://github.com/google/cadvisor/blob/master/utils/sysinfo/sysinfo.go#L203

func GetOsName

func GetOsName() string

GetOsName reads the /etc/os-release file and returns the os name

func GetVersionCodeName

func GetVersionCodeName() string

func IsCPUOnline

func IsCPUOnline(cpuID int) bool

func NewFirewallManager added in v1.0.3

func NewFirewallManager() firewall.Manager

func NewNetworkingAspect

func NewNetworkingAspect(cfg *api.NodeConfig) *networkingAspect

NewNetworkingAspect constructs new networkingAspect.

Types

type ChronycSynchronizationError added in v1.0.10

type ChronycSynchronizationError struct {
	// contains filtered or unexported fields
}

func (*ChronycSynchronizationError) Error added in v1.0.10

func (e *ChronycSynchronizationError) Error() string

func (*ChronycSynchronizationError) Unwrap added in v1.0.10

func (e *ChronycSynchronizationError) Unwrap() error

type NTPValidator added in v1.0.9

type NTPValidator struct{}

NTPValidator validates NTP synchronization status

func NewNTPValidator added in v1.0.9

func NewNTPValidator() *NTPValidator

NewNTPValidator creates a new NTP validator

func (*NTPValidator) Run added in v1.0.9

func (v *NTPValidator) Run(ctx context.Context, informer validation.Informer, _ *api.NodeConfig) error

Run validates NTP synchronization

func (*NTPValidator) Validate added in v1.0.9

func (v *NTPValidator) Validate() error

Validate performs the actual NTP validation

type SwapValidator added in v1.0.9

type SwapValidator struct{}

SwapValidator validates swap configuration in nodeadm debug

func NewSwapValidator added in v1.0.9

func NewSwapValidator() *SwapValidator

NewSwapValidator creates a new SwapValidator

func (*SwapValidator) Run added in v1.0.9

func (v *SwapValidator) Run(ctx context.Context, informer validation.Informer, _ *api.NodeConfig) error

Run validates the swap configuration

type SystemAspect

type SystemAspect interface {
	Name() string
	Setup() error
}

func NewLocalDiskAspect

func NewLocalDiskAspect(cfg *api.NodeConfig) SystemAspect

func NewPortsAspect

func NewPortsAspect(cfg *api.NodeConfig, logger *zap.Logger) SystemAspect

func NewSwapAspect

func NewSwapAspect(cfg *api.NodeConfig, logger *zap.Logger) SystemAspect

func NewSysctlAspect

func NewSysctlAspect(cfg *api.NodeConfig) SystemAspect

type TimedatectlSynchronizationError added in v1.0.10

type TimedatectlSynchronizationError struct {
	// contains filtered or unexported fields
}

func (*TimedatectlSynchronizationError) Error added in v1.0.10

func (e *TimedatectlSynchronizationError) Error() string

func (*TimedatectlSynchronizationError) Unwrap added in v1.0.10

func (e *TimedatectlSynchronizationError) Unwrap() error

type UlimitValidator added in v1.0.10

type UlimitValidator struct{}

UlimitValidator validates ulimit configuration before nodeadm init

func NewUlimitValidator added in v1.0.10

func NewUlimitValidator() *UlimitValidator

NewUlimitValidator creates a new UlimitValidator

func (*UlimitValidator) Run added in v1.0.10

Run validates the ulimit configuration

Jump to

Keyboard shortcuts

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