Documentation ¶
Index ¶
- Constants
- func FilterNodesWithEnoughCores(nodes []corev1.Node, cpuAmount string) ([]corev1.Node, error)
- func GetNodesByRole(cs kubernetes.Interface, role string) ([]corev1.Node, error)
- func GetNodesBySelector(cs kubernetes.Interface, selector labels.Selector) ([]corev1.Node, error)
- func GetWorkerNodes(cs kubernetes.Interface) ([]corev1.Node, error)
- func LabelNode(cs kubernetes.Interface, node *corev1.Node, newLabels map[string]string) error
- func PickTargetNode(workerNodes []corev1.Node) (*corev1.Node, bool)
Constants ¶
View Source
const (
// LabelRole contains the key for the role label
LabelRole = "node-role.kubernetes.io"
)
View Source
const (
// RoleWorker contains the worker role
RoleWorker = "worker"
)
Variables ¶
This section is empty.
Functions ¶
func FilterNodesWithEnoughCores ¶
FilterNodesWithEnoughCores returns all nodes with at least the amount of given CPU allocatable
func GetNodesByRole ¶
GetNodesByRole GetByRole returns all nodes with the specified role
func GetNodesBySelector ¶
GetNodesBySelector GetBySelector returns all nodes with the specified selector
func GetWorkerNodes ¶
func GetWorkerNodes(cs kubernetes.Interface) ([]corev1.Node, error)
GetWorkerNodes returns all nodes labeled as worker
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.