system

package
v0.0.0-...-d211ccd Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: MIT-0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureEKSNetworkConfiguration

func EnsureEKSNetworkConfiguration() error

ensureEKSNetworkConfiguration will install eks specific network configuration into system. NOTE: this is a temporary fix for AL2023, where the `80-ec2.network` setup by amazon-ec2-net-utils will cause systemd.network to manage all ENIs on host, and that can potentially result in multiple issues including:

  1. systemd.network races against vpc-cni to configure secondary enis and might cause routing rules/routes setup by vpc-cni to be flushed resulting in issues with pod networking.
  2. routes for those secondary ENIs obtained from dhcp will appear in main route table, which is a drift from our AL2 behavior.

To address this issue temporarily, we use drop-ins to alter configuration of `80-ec2.network` after boot to make it match against primary ENI only. TODO: there are limitations on current solutions as well, and we should figure long term solution for this:

  1. the altNames for ENIs(a new feature in AL2023) were setup by amazon-ec2-net-utils via udev rules, but it's disabled by eks.

func GetFipsInfo

func GetFipsInfo() (bool, bool, error)

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

ipsInstalled, fipsEnabled, err := getFipsInfo()

Types

type FakeResources

type FakeResources struct {
	Cpu    int
	Memory int64
}

func (FakeResources) GetMilliNumCores

func (fr FakeResources) GetMilliNumCores() (int, error)

func (FakeResources) GetOnlineMemory

func (fr FakeResources) GetOnlineMemory() (int64, error)

type Resources

type Resources interface {
	GetMilliNumCores() (int, error)
	GetOnlineMemory() (int64, error)
}

type SysfsResources

type SysfsResources struct{}

Real implementation of Resources interface that reads values from sysfs.

func (SysfsResources) GetMilliNumCores

func (pr SysfsResources) GetMilliNumCores() (int, error)

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

func (SysfsResources) GetOnlineMemory

func (pr SysfsResources) GetOnlineMemory() (int64, error)

Gets the total amount of online memory on the node in bytes.

type SystemAspect

type SystemAspect interface {
	Name() string
	Setup(*api.NodeConfig) error
}

func NewLocalDiskAspect

func NewLocalDiskAspect() SystemAspect

Jump to

Keyboard shortcuts

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