Documentation ¶
Index ¶
- func PodRequirementsFromPod(pod *v1.Pod, priorityByPriorityClassName map[string]types.PriorityClass) *schedulerobjects.PodRequirements
- func PodRequirementsFromPodSpec(podSpec *v1.PodSpec, ...) *schedulerobjects.PodRequirements
- func PriorityFromPodSpec(podSpec *v1.PodSpec, priorityClasses map[string]types.PriorityClass) (int32, bool)
- func SchedulingInfoFromSubmitJob(submitJob *armadaevents.SubmitJob, submitTime time.Time, ...) (*schedulerobjects.JobSchedulingInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PodRequirementsFromPod ¶
func PodRequirementsFromPod(pod *v1.Pod, priorityByPriorityClassName map[string]types.PriorityClass) *schedulerobjects.PodRequirements
PodRequirementsFromPod function creates the schedulerobjects and creates a value for the annotation field by supplying it with a cloned value of pod.Annotations
func PodRequirementsFromPodSpec ¶
func PodRequirementsFromPodSpec(podSpec *v1.PodSpec, priorityByPriorityClassName map[string]types.PriorityClass) *schedulerobjects.PodRequirements
PodRequirementsFromPodSpec function returns *schedulerobjects.PodRequirements for podSpec. An error is logged if the podSpec uses an unknown priority class. This function may mutate podSpec.
func PriorityFromPodSpec ¶
func PriorityFromPodSpec(podSpec *v1.PodSpec, priorityClasses map[string]types.PriorityClass) (int32, bool)
PriorityFromPodSpec returns the priority in a pod spec. If priority is set directly, that value is returned. Otherwise, it returns the value of the key podSpec. In both cases the value along with true boolean is returned. PriorityClassName in priorityByPriorityClassName map. If no priority is set for the pod spec, 0 along with a false boolean would be returned
func SchedulingInfoFromSubmitJob ¶ added in v0.4.44
func SchedulingInfoFromSubmitJob(submitJob *armadaevents.SubmitJob, submitTime time.Time, priorityClasses map[string]types.PriorityClass) (*schedulerobjects.JobSchedulingInfo, error)
SchedulingInfoFromSubmitJob returns a minimal representation of a job containing only the info needed by the scheduler.
Types ¶
This section is empty.