Documentation ¶
Index ¶
- func FindConditionIndex(status *kueue.WorkloadStatus, conditionType string) int
- func InCondition(w *kueue.Workload, condition string) bool
- func Key(w *kueue.Workload) string
- func QueueKey(w *kueue.Workload) string
- func ResourceQuantity(name corev1.ResourceName, v int64) resource.Quantity
- func ResourceValue(name corev1.ResourceName, q resource.Quantity) int64
- func UpdateStatus(ctx context.Context, c client.Client, wl *kueue.Workload, conditionType string, ...) error
- func UpdateStatusIfChanged(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 FindConditionIndex ¶
func FindConditionIndex(status *kueue.WorkloadStatus, conditionType string) int
FindConditionIndex finds the provided condition from the given status and returns the index. Returns -1 if the condition is not present.
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.
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.
type PodSetResources ¶
type PodSetResources struct { Name string Requests Requests Flavors map[corev1.ResourceName]string }
type Requests ¶
type Requests map[corev1.ResourceName]int64
Requests maps ResourceName to flavor to value; for CPU it is tracked in MilliCPU.
Click to show internal directories.
Click to hide internal directories.