infrastructure

package
v0.0.0-...-3b77fb5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IntelVendorID = "GenuineIntel"
	AMDVendorID   = "AuthenticAMD"
)

Variables

This section is empty.

Functions

func CPUArchitecture

func CPUArchitecture(ctx context.Context, node *corev1.Node) (string, error)

CPUArchitecture returns CPU Architecture from lscpu output

func CPUVendorId

func CPUVendorId(ctx context.Context, node *corev1.Node) (string, error)

CPUVendorId returns Vendor ID information from lscpu output

func IsAMD

func IsAMD(ctx context.Context, node *corev1.Node) (bool, error)

IsAMD returns if Vendor ID is AuthenticAMD in lscpu output

func IsARM

func IsARM(ctx context.Context, node *corev1.Node) (bool, error)

IsARM returns if Architecture is aarch64

func IsCPUVendor

func IsCPUVendor(ctx context.Context, node *corev1.Node, vendor string) (bool, error)

IsCPUVendor checks if the CPU Vendor ID matches the given vendor string

func IsIntel

func IsIntel(ctx context.Context, node *corev1.Node) (bool, error)

IsIntel returns if Vendor ID is GenuineIntel in lscpu output

func IsVM

func IsVM(ctx context.Context, node *corev1.Node) (bool, error)

IsVM checks if a given node's underlying infrastructure is a VM

Types

type CpuArchitecture

type CpuArchitecture struct {
	Lscpu []cpuField `json:"lscpu"`
}

CpuArchitecture struct to represent CPU Details

Jump to

Keyboard shortcuts

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