Documentation ¶
Index ¶
- func ApplyAdmissionStatus(ctx context.Context, c client.Client, w *kueue.Workload, strict bool) error
- func BaseSSAWorkload(w *kueue.Workload) *kueue.Workload
- func CanBePartiallyAdmitted(wl *kueue.Workload) bool
- func GetQueueOrderTimestamp(w *kueue.Workload) *metav1.Time
- func IsAdmitted(w *kueue.Workload) bool
- func Key(w *kueue.Workload) string
- func QueueKey(w *kueue.Workload) string
- func ReclaimablePodsAreEqual(a, b []kueue.ReclaimablePod) bool
- func ResourceQuantity(name corev1.ResourceName, v int64) resource.Quantity
- func ResourceValue(name corev1.ResourceName, q resource.Quantity) int64
- func SetAdmission(w *kueue.Workload, admission *kueue.Admission)
- func SetEvictedCondition(w *kueue.Workload, reason string, message string)
- func UnsetAdmissionWithCondition(wl *kueue.Workload, reason, message string)
- func UpdateReclaimablePods(ctx context.Context, c client.Client, w *kueue.Workload, ...) error
- func UpdateStatus(ctx context.Context, c client.Client, wl *kueue.Workload, conditionType string, ...) error
- type Info
- type PodSetResources
- type Requests
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyAdmissionStatus ¶ added in v0.4.0
func ApplyAdmissionStatus(ctx context.Context, c client.Client, w *kueue.Workload, strict bool) error
ApplyAdmissionStatus updated all the admission related status fields of a workload with SSA. if strict is true, resourceVersion will be part of the patch, make this call fail if Workload was changed.
func BaseSSAWorkload ¶ added in v0.3.0
BaseSSAWorkload creates a new object based on the input workload that only contains the fields necessary to identify the original object. The object can be used in as a base for Server-Side-Apply.
func CanBePartiallyAdmitted ¶ added in v0.4.0
func GetQueueOrderTimestamp ¶ added in v0.4.0
GetQueueOrderTimestamp return the timestamp to be used by the scheduler. It could be the workload creation time or the last time a PodsReady timeout has occurred.
func IsAdmitted ¶ added in v0.4.0
IsAdmitted checks if workload is admitted based on conditions
func ReclaimablePodsAreEqual ¶ added in v0.4.0
func ReclaimablePodsAreEqual(a, b []kueue.ReclaimablePod) bool
ReclaimablePodsAreEqual checks if two Reclaimable pods are semantically equal having the same length and all keys have the same value.
func ResourceQuantity ¶
func ResourceQuantity(name corev1.ResourceName, v int64) resource.Quantity
func ResourceValue ¶
func ResourceValue(name corev1.ResourceName, q resource.Quantity) int64
ResourceValue returns the integer value for the resource name. It's milli-units for CPU and absolute units for everything else.
func SetAdmission ¶ added in v0.4.0
SetAdmission applies the provided admission to the workload. The WorkloadAdmitted and WorkloadEvicted are added or updated if necessary.
func SetEvictedCondition ¶ added in v0.4.0
func UnsetAdmissionWithCondition ¶ added in v0.3.0
func UpdateReclaimablePods ¶ added in v0.4.0
func UpdateReclaimablePods(ctx context.Context, c client.Client, w *kueue.Workload, reclaimablePods []kueue.ReclaimablePod) error
UpdateReclaimablePods updates the ReclaimablePods list for the workload wit SSA.
func UpdateStatus ¶
func UpdateStatus(ctx context.Context, c client.Client, wl *kueue.Workload, conditionType string, conditionStatus metav1.ConditionStatus, reason, message string, managerPrefix string) error
UpdateStatus updates the condition of a workload with ssa, filelManager being set to managerPrefix + "-" + conditionType
Types ¶
type Info ¶
type Info struct { Obj *kueue.Workload // list of total resources requested by the podsets. TotalRequests []PodSetResources // Populated from the queue during admission or from the admission field if // already admitted. ClusterQueue string }
Info holds a Workload object and some pre-processing.
func (*Info) CanBePartiallyAdmitted ¶ added in v0.4.0
type PodSetResources ¶
type PodSetResources struct { Name string Requests Requests Count int32 Flavors map[corev1.ResourceName]kueue.ResourceFlavorReference }
func (*PodSetResources) ScaledTo ¶ added in v0.4.0
func (psr *PodSetResources) ScaledTo(newCount int32) *PodSetResources
type Requests ¶
type Requests map[corev1.ResourceName]int64
Requests maps ResourceName to flavor to value; for CPU it is tracked in MilliCPU.
func (Requests) ToResourceList ¶ added in v0.3.0
func (r Requests) ToResourceList() corev1.ResourceList