Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assignment ¶
type Assignment struct { PodSets []PodSetAssignment TotalBorrow cache.FlavorResourceQuantities // contains filtered or unexported fields }
func AssignFlavors ¶
func AssignFlavors(log logr.Logger, wl *workload.Info, resourceFlavors map[kueue.ResourceFlavorReference]*kueue.ResourceFlavor, cq *cache.ClusterQueue) Assignment
AssignFlavors assigns flavors for each of the resources requested in each pod set. The result for each pod set is accompanied with reasons why the flavor can't be assigned immediately. Each assigned flavor is accompanied with a FlavorAssignmentMode.
func (*Assignment) Borrows ¶
func (a *Assignment) Borrows() bool
func (*Assignment) Message ¶
func (a *Assignment) Message() string
func (*Assignment) RepresentativeMode ¶
func (a *Assignment) RepresentativeMode() FlavorAssignmentMode
RepresentativeMode calculates the representative mode for the assigment as the worst assignment mode among all the pod sets.
func (*Assignment) ToAPI ¶
func (a *Assignment) ToAPI() []kueue.PodSetAssignment
type FlavorAssignment ¶
type FlavorAssignment struct { Name kueue.ResourceFlavorReference Mode FlavorAssignmentMode // contains filtered or unexported fields }
type FlavorAssignmentMode ¶
type FlavorAssignmentMode int
FlavorAssignmentMode describes whether the flavor can be assigned immediately or what needs to happen so it can be assigned.
const ( // NoFit means that there is not enough quota to assign this flavor. NoFit FlavorAssignmentMode = iota // Preempt means that there is not enough unused min quota in the ClusterQueue // or cohort. Preempting other workloads in the CluserQueue or cohort, or // waiting for them to finish might make it possible to assign this flavor. Preempt // Fit means that there is enough unused quota in the cohort to assign this // flavor. Fit )
The flavor assigment modes below are ordered from lowest to highest preference.
func (FlavorAssignmentMode) String ¶
func (m FlavorAssignmentMode) String() string
type PodSetAssignment ¶
type PodSetAssignment struct { Name string Flavors ResourceAssignment Status *Status Requests corev1.ResourceList }
PodSetAssignment holds the assigned flavors and status messages for each of the resources that the pod set requests. Each assigned flavor is accompanied with an AssignmentMode. Empty .Flavors can be interpreted as NoFit mode for all the resources. Empty .Status can be interpreted as Fit mode for all the resources. .Flavors and .Status can't be empty at the same time, once PodSetAssignment is fully calculated.
func (*PodSetAssignment) RepresentativeMode ¶
func (psa *PodSetAssignment) RepresentativeMode() FlavorAssignmentMode
RepresentativeMode calculates the representative mode for this assignment as the worst assignment mode among all assigned flavors.
type ResourceAssignment ¶
type ResourceAssignment map[corev1.ResourceName]*FlavorAssignment