adapters

package
v0.3.66-rc-01f118b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PodRequirementsFromPod

func PodRequirementsFromPod(pod *v1.Pod, priorityByPriorityClassName map[string]configuration.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]configuration.PriorityClass) *schedulerobjects.PodRequirements

PodRequirementsFromPodSpec function returns the *schedulerobjects.PodRequirements object. It logs an error if priority is set using priorityClassName and there is no corresponding entry in the priorityByPriorityClassName map.

func PriorityFromPodSpec

func PriorityFromPodSpec(podSpec *v1.PodSpec, priorityByPriorityClassName map[string]configuration.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

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL