Version: v0.4.2 Latest Latest

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

Go to latest
Published: May 10, 2022 License: Apache-2.0 Imports: 4 Imported by: 0




This section is empty.


This section is empty.


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) 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 Min

func Multiply

func Multiply(factor int64, res v1.ResourceList) v1.ResourceList

Multiply multiplies resources with given factor for each named resource.

func PodRequestsForGPU

func PodRequestsForGPU(pod *v1.Pod) bool

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.


This section is empty.

Source Files

Jump to

Keyboard shortcuts

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