common_info

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourcesWereNotFoundMsg = "no nodes with enough resources were found"
	DefaultPodgroupError     = "Unable to schedule podgroup"
	DefaultPodError          = "Unable to schedule pod"
)
View Source
const FakePogGroupId = "12345678"
View Source
const GPUFraction = "gpu-fraction"
View Source
const (
	NoMaxAllowedResource = float64(-1)
)

Variables

This section is empty.

Functions

func BuildNode

func BuildNode(name string, alloc v1.ResourceList) *v1.Node

func BuildOwnerReference

func BuildOwnerReference(owner string) metav1.OwnerReference

func BuildPod

func BuildPod(namespace, name, nodeName string, phase v1.PodPhase, req v1.ResourceList,
	owner []metav1.OwnerReference, labels map[string]string, annotations map[string]string,
) *v1.Pod

func BuildResource

func BuildResource(cpu string, memory string) *resource_info.Resource

func BuildResourceList

func BuildResourceList(cpu string, memory string) v1.ResourceList

func BuildResourceListWithGPU

func BuildResourceListWithGPU(cpu string, memory string, gpu string) v1.ResourceList

func BuildResourceListWithMig

func BuildResourceListWithMig(cpu string, memory string, migProfiles ...string) v1.ResourceList

func BuildResourceRequirements

func BuildResourceRequirements(cpu string, memory string) *resource_info.ResourceRequirements

func BuildResourceWithGpu

func BuildResourceWithGpu(cpu string, memory string, gpu string) *resource_info.Resource

func BuildStorageCapacity

func BuildStorageCapacity(name, namespace, storageClass string, capacity, maxVolumeSize int64, nodeTopology *metav1.LabelSelector) *v12.CSIStorageCapacity

Types

type CSIDriverID

type CSIDriverID types.UID

type CompareFn

type CompareFn func(interface{}, interface{}) int

CompareFn is the func declaration used by sort or priority queue.

type ConfigMapID

type ConfigMapID types.UID

type FitError

type FitError struct {
	NodeName        string
	Reasons         []string
	DetailedReasons []string
	// contains filtered or unexported fields
}

func NewFitError

func NewFitError(name, namespace, nodeName string, message string) *FitError

func NewFitErrorByReasons

func NewFitErrorByReasons(name, namespace, nodeName string, err error, reasons ...string) *FitError

func NewFitErrorInsufficientResource

func NewFitErrorInsufficientResource(
	name, namespace, nodeName string,
	resourceRequested *resource_info.ResourceRequirements, usedResource, capacityResource *resource_info.Resource,
	capacityGpuMemory int64, gangSchedulingJob bool,
) *FitError

func NewFitErrorWithDetailedMessage

func NewFitErrorWithDetailedMessage(name, namespace, nodeName string, reasons []string, detailedReasons ...string) *FitError

func (*FitError) Error

func (f *FitError) Error() string

type FitErrors

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

func NewFitErrors

func NewFitErrors() *FitErrors

func (*FitErrors) AddNodeErrors

func (f *FitErrors) AddNodeErrors(errors *FitErrors)

func (*FitErrors) DetailedError

func (f *FitErrors) DetailedError() string

func (*FitErrors) Error

func (f *FitErrors) Error() string

func (*FitErrors) SetError

func (f *FitErrors) SetError(err string)

func (*FitErrors) SetNodeError

func (f *FitErrors) SetNodeError(nodeName string, err error)

type LessFn

type LessFn func(interface{}, interface{}) bool

LessFn is the func declaration used by sort or priority queue.

type NotFoundError

type NotFoundError struct {
	Name string
}

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

type ObjectKey

type ObjectKey string

func NewObjectKey

func NewObjectKey(namespace, name string) ObjectKey

type PodGroupID

type PodGroupID types.UID

type PodID

type PodID types.UID

type QueueID

type QueueID types.UID

type SchedulingConstraintsSignature

type SchedulingConstraintsSignature string

type StorageCapacityID

type StorageCapacityID types.UID

type StorageClassID

type StorageClassID types.UID

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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