node_manager

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeManager

type NodeManager struct {
	// contains filtered or unexported fields
}

func NewNodeManager

func NewNodeManager(nodepools []*pb.NodePool) (*NodeManager, error)

NewNodeManager returns a NodeManager pointer with initialised caches about nodes.

func (*NodeManager) GetCapacity

func (nm *NodeManager) GetCapacity(np *pb.NodePool) k8sV1.ResourceList

GetCapacity returns a theoretical capacity for a new node from specified nodepool.

func (*NodeManager) GetLabels

func (nm *NodeManager) GetLabels(np *pb.NodePool) map[string]string

GetLabels returns default labels with their theoretical values for the specified nodepool.

func (*NodeManager) GetOs

func (nm *NodeManager) GetOs(image string) string

GetOs returns operating system name as a string.

func (*NodeManager) Refresh

func (nm *NodeManager) Refresh(nodepools []*pb.NodePool) error

Refresh checks if the information about specified nodepools needs refreshing, and if so, refreshes it.

Jump to

Keyboard shortcuts

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