Documentation ¶
Index ¶
- func AdmissionPatch(w *kueue.Workload) *kueue.Workload
- func BaseSSAWorkload(w *kueue.Workload) *kueue.Workload
- func FindConditionIndex(status *kueue.WorkloadStatus, conditionType string) int
- 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 UnsetAdmissionWithCondition(ctx context.Context, c client.Client, wl *kueue.Workload, ...) error
- 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 AdmissionPatch ¶ added in v0.3.0
AdmissionPatch creates a new object based on the input workload that contains the admission. The object can be used in Server-Side-Apply.
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 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.
func UnsetAdmissionWithCondition ¶ added in v0.3.0
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.
type PodSetResources ¶
type PodSetResources struct { Name string Requests Requests Flavors map[corev1.ResourceName]kueue.ResourceFlavorReference }
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