Help us shape the future of Go! Take the 2026 Go Developer Survey

resources

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MBytes = 1024 * 1024
	GBytes = 1024 * MBytes
)

Variables

This section is empty.

Functions

func PatchPodResourceLimitList

func PatchPodResourceLimitList(pod *corev1.Pod, resourceList *corev1.ResourceList)

func RequestBitflowResourceLimitByNode

func RequestBitflowResourceLimitByNode(node *corev1.Node, conf *config.Config) float64

Types

type NodeInfo

type NodeInfo struct {
	NumberOfBitflowContainers int
	TotalResourceLimit        float64
	AllocatableResources      corev1.ResourceList
}

func (*NodeInfo) GetCurrentResourceList

func (nodeInfo *NodeInfo) GetCurrentResourceList(initSize, spawning int, factor float64) *corev1.ResourceList

func (*NodeInfo) String

func (nodeInfo *NodeInfo) String() string

type ResourceAssigner

type ResourceAssigner struct {
	Client     client.Client
	Config     *config.Config
	Respawning *common.RespawningPods
	Namespace  string
	PodLabels  map[string]string
}

func (*ResourceAssigner) AssignResources

func (res *ResourceAssigner) AssignResources(pod *corev1.Pod, node *corev1.Node) *corev1.ResourceList

func (*ResourceAssigner) AssignResourcesNodeImplicit

func (res *ResourceAssigner) AssignResourcesNodeImplicit(pod *corev1.Pod) *corev1.ResourceList

AssignResourcesNodeImplicit: Assumes the pod was once already deployed and still includes information about the former node on which this pod was placed

func (*ResourceAssigner) GetCurrentResources

func (res *ResourceAssigner) GetCurrentResources(node *corev1.Node) *corev1.ResourceList

func (*ResourceAssigner) RequestNodeInfo

func (res *ResourceAssigner) RequestNodeInfo(node *corev1.Node, podName string) NodeInfo

Jump to

Keyboard shortcuts

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