Documentation ¶
Index ¶
- func ContainerPid(ctx context.Context, node *corev1.Node, containerId string) (string, error)
- func CpuManagerCpuSet(ctx context.Context, node *corev1.Node) (cpuset.CPUSet, error)
- func ExecCommand(ctx context.Context, node *corev1.Node, command []string) ([]byte, error)
- func GetAndRemoveCpuSiblingsFromMap(numaCoreSiblings map[int]map[int][]int, coreId int) []string
- func GetByCpuAllocatable(nodesList []corev1.Node, cpuQty int) []corev1.Node
- func GetByCpuCapacity(nodesList []corev1.Node, cpuQty int) []corev1.Node
- func GetByLabels(nodeLabels map[string]string) ([]corev1.Node, error)
- func GetByName(nodeName string) (*corev1.Node, error)
- func GetByRole(role string) ([]corev1.Node, error)
- func GetBySelector(selector labels.Selector) ([]corev1.Node, error)
- func GetCoreSiblings(ctx context.Context, node *corev1.Node) (map[int]map[int][]int, error)
- func GetDefaultSmpAffinityRaw(ctx context.Context, node *corev1.Node) (string, error)
- func GetDefaultSmpAffinitySet(ctx context.Context, node *corev1.Node) (cpuset.CPUSet, error)
- func GetKubeletConfig(ctx context.Context, node *corev1.Node) (*kubeletconfigv1beta1.KubeletConfiguration, error)
- func GetNonPerformancesWorkers(nodeSelectorLabels map[string]string) ([]corev1.Node, error)
- func GetNumaNodes(ctx context.Context, node *corev1.Node) (map[int][]int, error)
- func GetNumaRanges(cpuString string) string
- func GetOnlineCPUsSet(ctx context.Context, node *corev1.Node) (cpuset.CPUSet, error)
- func GetSMTLevel(ctx context.Context, cpuID int, node *corev1.Node) int
- func HasPreemptRTKernel(ctx context.Context, node *corev1.Node) error
- func MatchingOptionalSelector(toFilter []corev1.Node) ([]corev1.Node, error)
- func TunedForNode(node *corev1.Node, sno bool) *corev1.Pod
- func WaitForReadyOrFail(tag, nodeName string, timeout, polling time.Duration)
- type ContainerInfo
- type CpuManagerStateInfo
- type CrictlInfo
- type NodeCPU
- type NodeInterface
- type NumaNodes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainerPid ¶
ContainerPid returns container process pid using crictl inspect command
func CpuManagerCpuSet ¶
CpuManagerCpuSet returns cpu manager state file data
func ExecCommand ¶
ExecCommand returns the output of the command execution as a []byte
func GetAndRemoveCpuSiblingsFromMap ¶
GetAndRemoveCpuSiblingsFromMap function returns the cpus siblings associated with core Also updates the map by deleting the cpu siblings returned
func GetByCpuAllocatable ¶
func GetByLabels ¶
GetByLabels returns all nodes with the specified labels
func GetBySelector ¶
GetBySelector returns all nodes with the specified selector
func GetCoreSiblings ¶
GetCoreSiblings returns the siblings of core per numa node
func GetDefaultSmpAffinitySet ¶
GetDefaultSmpAffinitySet returns the default smp affinity mask for the node Warning: Please note that default smp affinity mask is not aware
of offline cpus and will return the affinity bits for those as well. You must intersect the mask with the mask returned by GetOnlineCPUsSet if this is not desired.
func GetKubeletConfig ¶
func GetKubeletConfig(ctx context.Context, node *corev1.Node) (*kubeletconfigv1beta1.KubeletConfiguration, error)
GetKubeletConfig returns KubeletConfiguration loaded from the node /etc/kubernetes/kubelet.conf
func GetNonPerformancesWorkers ¶
GetNonPerformancesWorkers returns list of nodes with non matching perfomance profile labels
func GetNumaNodes ¶
GetNumaNodes returns the number of numa nodes and the associated cpus as list on the node
func GetNumaRanges ¶
GetNumaRanges function Splits the numa Siblings in to multiple Ranges Example for Cpu Siblings: 10,50,11,51,12,52,13,53,14,54 , will return 10-14,50-54
func GetOnlineCPUsSet ¶
GetOnlineCPUsSet returns the list of online (being scheduled) CPUs on the node
func GetSMTLevel ¶
GetSMTLevel returns the SMT level on the node using the given cpuID as target Use a random cpuID from the return value of GetOnlineCPUsSet if not sure
func HasPreemptRTKernel ¶
HasPreemptRTKernel returns no error if the node booted with PREEMPT RT kernel
func MatchingOptionalSelector ¶
MatchingOptionalSelector filter the given slice with only the nodes matching the optional selector. If no selector is set, it returns the same list. The NODES_SELECTOR must be set with a labelselector expression. For example: NODES_SELECTOR="sctp=true" Inspired from: https://github.com/fedepaol/sriov-network-operator/blob/master/test/util/nodes/nodes.go
func TunedForNode ¶
TunedForNode find tuned pod for appropriate node
func WaitForReadyOrFail ¶
Types ¶
type ContainerInfo ¶
type ContainerInfo struct {
PID int `json:"pid"`
}
type CpuManagerStateInfo ¶
type CrictlInfo ¶
type CrictlInfo struct { Info struct { Pid int `json:"pid"` Linux struct { Resources struct { CPU struct { Shares int `json:"shares"` Quota int `json:"quota"` Period int `json:"period"` Cpus string `json:"cpus"` } `json:"cpus"` } `json:"resources"` CgroupsPath string `json:"cgroupsPath"` } `json:"linux"` } `json:"info"` }
type NodeInterface ¶
type NodeInterface struct { Name string Physical bool UP bool Bridge bool // contains filtered or unexported fields }
Node Ether/virtual Interface
func GetNodeInterfaces ¶
Get Node Ethernet/Virtual Interfaces