utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LabelRole contains the key for the role label
	LabelRole = "node-role.kubernetes.io"
	// LabelHostname contains the key for the hostname label
	LabelHostname = "kubernetes.io/hostname"
)
View Source
const (
	CentosImage = "quay.io/centos/centos:8"
)
View Source
const (
	// RoleWorker contains the worker role
	RoleWorker = "worker"
)

Variables

View Source
var BinariesPath string

Functions

func DeletePodSyncByName

func DeletePodSyncByName(f *framework.Framework, podName string)

func DeletePodsAsync

func DeletePodsAsync(f *framework.Framework, podMap map[string]*v1.Pod)

func FilterNodesWithEnoughCores

func FilterNodesWithEnoughCores(nodes []v1.Node, cpuAmount string) ([]v1.Node, error)

FilterNodesWithEnoughCores returns all nodes with at least the amount of given CPU allocatable

func GetNodesByRole

func GetNodesByRole(f *framework.Framework, role string) ([]v1.Node, error)

GetByRole returns all nodes with the specified role

func GetNodesBySelector

func GetNodesBySelector(f *framework.Framework, selector labels.Selector) ([]v1.Node, error)

GetBySelector returns all nodes with the specified selector

func GetWorkerNodes

func GetWorkerNodes(f *framework.Framework) ([]v1.Node, error)

GetWorkerNodes returns all nodes labeled as worker

func MakeBestEffortSleeperPod

func MakeBestEffortSleeperPod() *v1.Pod

func MakeGuaranteedSleeperPod

func MakeGuaranteedSleeperPod(cpuLimit string) *v1.Pod

Types

This section is empty.

Jump to

Keyboard shortcuts

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