Documentation
¶
Index ¶
- Constants
- func BuildNode(name string, alloc v1.ResourceList) *v1.Node
- func BuildOwnerReference(owner string) metav1.OwnerReference
- func BuildPod(namespace, name, nodeName string, phase v1.PodPhase, req v1.ResourceList, ...) *v1.Pod
- func BuildResource(cpu string, memory string) *resource_info.Resource
- func BuildResourceList(cpu string, memory string) v1.ResourceList
- func BuildResourceListWithGPU(cpu string, memory string, gpu string) v1.ResourceList
- func BuildResourceListWithMig(cpu string, memory string, migProfiles ...string) v1.ResourceList
- func BuildResourceRequirements(cpu string, memory string) *resource_info.ResourceRequirements
- func BuildResourceWithGpu(cpu string, memory string, gpu string) *resource_info.Resource
- func BuildStorageCapacity(name, namespace, storageClass string, capacity, maxVolumeSize int64, ...) *v12.CSIStorageCapacity
- type CSIDriverID
- type CompareFn
- type CompareTwoFactors
- type ConfigMapID
- type FitError
- func NewFitError(name, namespace, nodeName string, message string) *FitError
- func NewFitErrorByReasons(name, namespace, nodeName string, err error, reasons ...string) *FitError
- func NewFitErrorInsufficientResource(name, namespace, nodeName string, ...) *FitError
- func NewFitErrorWithDetailedMessage(name, namespace, nodeName string, reasons []string, detailedReasons ...string) *FitError
- type FitErrors
- type LessFn
- type NotFoundError
- type ObjectKey
- type PodGroupID
- type PodID
- type QueueID
- type SchedulingConstraintsSignature
- type StorageCapacityID
- type StorageClassID
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 BuildOwnerReference ¶
func BuildOwnerReference(owner string) metav1.OwnerReference
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 CompareFn ¶
type CompareFn func(interface{}, interface{}) int
CompareFn is the func declaration used by sort or priority queue.
type CompareTwoFactors ¶
type CompareTwoFactors func(interface{}, interface{}, interface{}, interface{}) int
CompareTwoFactors is the func declaration used by sort or priority queue for 2 factors.
type ConfigMapID ¶
type FitError ¶
type FitError struct {
NodeName string
Reasons []string
DetailedReasons []string
// contains filtered or unexported fields
}
func NewFitError ¶
func NewFitErrorByReasons ¶
func NewFitErrorInsufficientResource ¶
func NewFitErrorInsufficientResource( name, namespace, nodeName string, resourceRequested *resource_info.ResourceRequirements, usedResource, capacityResource *resource_info.Resource, capacityGpuMemory int64, gangSchedulingJob bool, ) *FitError
type FitErrors ¶
type FitErrors struct {
// contains filtered or unexported fields
}
func NewFitErrors ¶
func NewFitErrors() *FitErrors
func (*FitErrors) AddNodeErrors ¶
func (*FitErrors) DetailedError ¶
func (*FitErrors) SetNodeError ¶
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 PodGroupID ¶
type SchedulingConstraintsSignature ¶
type SchedulingConstraintsSignature string
type StorageCapacityID ¶
type StorageClassID ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.