Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resource ¶
Resource is a collection of compute resource.
func ComputePodResourceRequest ¶
ComputePodResourceRequest returns a framework.Resource that covers the largest width in each resource dimension. Because init-containers run sequentially, we collect the max in each dimension iteratively. In contrast, we sum the resource vectors for regular containers since they run simultaneously.
If Pod Overhead is specified, the resources defined for Overhead are added to the calculated Resource request sum
Example:
Pod:
InitContainers IC1: CPU: 2 Memory: 1G IC2: CPU: 2 Memory: 3G Containers C1: CPU: 2 Memory: 1G C2: CPU: 1 Memory: 1G
Result: CPU: 3, Memory: 3G
func NewEmptyResource ¶ added in v1.13.2
func NewEmptyResource() Resource
func NewResource ¶ added in v1.13.2
func (*Resource) Add ¶
func (r *Resource) Add(rl v1.ResourceList)
Add adds ResourceList into Resource.
func (*Resource) GetCPUQuantity ¶ added in v1.13.2
func (*Resource) GetMemoryQuantity ¶ added in v1.13.2
func (*Resource) SetMaxResource ¶
func (r *Resource) SetMaxResource(rl v1.ResourceList)
SetMaxResource compares with ResourceList and takes max value for each Resource.
Click to show internal directories.
Click to hide internal directories.