Documentation ¶
Index ¶
- func AnyLessThanOrEqual(a v1.ResourceList, b v1.ResourceList) (bool, []v1.ResourceName)
- func ComputePodResourceRequest(pod *v1.Pod) v1.ResourceList
- func ComputePodSpecResourceRequest(spec *v1.PodSpec) v1.ResourceList
- func GetGpuResource(resourceList v1.ResourceList) *resource.Quantity
- func JobRequestsForGPU(specs map[apiv1.ReplicaType]*apiv1.ReplicaSpec) bool
- func JobResourceRequests(replicas map[apiv1.ReplicaType]*apiv1.ReplicaSpec) (normal, spot v1.ResourceList)
- func MaximumContainersResources(containers []v1.Container) v1.ResourceRequirements
- func Min(a, b resource.Quantity) resource.Quantity
- func Multiply(factor int64, res v1.ResourceList) v1.ResourceList
- func PodRequestsForGPU(pod *v1.Pod) bool
- func ReplicaRequestsForGPU(spec *apiv1.ReplicaSpec) bool
- func ReplicaResourceRequests(rspec *apiv1.ReplicaSpec) v1.ResourceList
- func SumUpContainersResources(containers []v1.Container) v1.ResourceRequirements
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyLessThanOrEqual ¶ added in v0.5.0
func AnyLessThanOrEqual(a v1.ResourceList, b v1.ResourceList) (bool, []v1.ResourceName)
AnyLessThanOrEqual returns true if a < b for any key in b If false, it returns the keys in a that exceeded b
func ComputePodResourceRequest ¶
func ComputePodResourceRequest(pod *v1.Pod) v1.ResourceList
ComputePodResourceRequest returns the requested resource of the Pod
func ComputePodSpecResourceRequest ¶
func ComputePodSpecResourceRequest(spec *v1.PodSpec) v1.ResourceList
ComputePodSpecResourceRequest returns the requested resource of the PodSpec
func GetGpuResource ¶
func GetGpuResource(resourceList v1.ResourceList) *resource.Quantity
GetGpuResource get gpu from resource list if gpu resource exists
func JobRequestsForGPU ¶
func JobRequestsForGPU(specs map[apiv1.ReplicaType]*apiv1.ReplicaSpec) bool
func JobResourceRequests ¶ added in v0.4.2
func JobResourceRequests(replicas map[apiv1.ReplicaType]*apiv1.ReplicaSpec) (normal, spot v1.ResourceList)
func MaximumContainersResources ¶
func MaximumContainersResources(containers []v1.Container) v1.ResourceRequirements
MaximumContainersResources iterate resources in containers list and compute a maximum one for each resource.
func Multiply ¶
func Multiply(factor int64, res v1.ResourceList) v1.ResourceList
Multiply multiplies resources with given factor for each named resource.
func PodRequestsForGPU ¶
func ReplicaRequestsForGPU ¶
func ReplicaRequestsForGPU(spec *apiv1.ReplicaSpec) bool
func ReplicaResourceRequests ¶ added in v0.4.2
func ReplicaResourceRequests(rspec *apiv1.ReplicaSpec) v1.ResourceList
func SumUpContainersResources ¶
func SumUpContainersResources(containers []v1.Container) v1.ResourceRequirements
SumUpContainersResources sum up resources aggregated from containers list.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.