Documentation
¶
Index ¶
- Constants
- func GetFipsInfo() (bool, bool, error)
- func GetMachineMemoryCapacity() (uint64, error)
- func GetMilliNumCores() (int, error)
- func GetOsName() string
- func GetVersionCodeName() string
- func IsCPUOnline(cpuID int) bool
- func NewFirewallManager() firewall.Manager
- func NewNetworkingAspect(cfg *api.NodeConfig) *networkingAspect
- type NTPValidator
- type SwapValidator
- type SystemAspect
Constants ¶
const ( UbuntuOsName = "ubuntu" RhelOsName = "rhel" AmazonOsName = "amzn" UbuntuResolvConfPath = "/run/systemd/resolve/resolv.conf" )
Variables ¶
This section is empty.
Functions ¶
func GetFipsInfo ¶
Returns whether FIPS module is both installed an enabled on the system
ipsInstalled, fipsEnabled, err := getFipsInfo()
func GetMachineMemoryCapacity ¶
GetMachineMemoryCapacity returns the machine's total memory from /proc/meminfo. Returns the total memory capacity as number of bytes.
func GetMilliNumCores ¶
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 NewFirewallManager ¶ added in v1.0.3
func NewNetworkingAspect ¶
func NewNetworkingAspect(cfg *api.NodeConfig) *networkingAspect
NewNetworkingAspect constructs new networkingAspect.
Types ¶
type NTPValidator ¶ added in v1.0.9
type NTPValidator struct {
// contains filtered or unexported fields
}
NTPValidator validates NTP synchronization status
func NewNTPValidator ¶ added in v1.0.9
func NewNTPValidator(logger *zap.Logger) *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, nodeConfig *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 {
// contains filtered or unexported fields
}
SwapValidator validates swap configuration before nodeadm init
func NewSwapValidator ¶ added in v1.0.9
func NewSwapValidator(logger *zap.Logger) *SwapValidator
NewSwapValidator creates a new SwapValidator
func (*SwapValidator) Run ¶ added in v1.0.9
func (v *SwapValidator) Run(ctx context.Context, informer validation.Informer, nodeConfig *api.NodeConfig) error
Run validates the swap configuration
func (*SwapValidator) Validate ¶ added in v1.0.9
func (v *SwapValidator) Validate() error
Validate performs the swap validation
type SystemAspect ¶
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