package resource
import "k8s.io/kubernetes/contrib/mesos/pkg/scheduler/resource"
Package resource contains the Mesos scheduler specific resource functions
Index ¶
- Constants
- func LimitPodCPU(pod *api.Pod, defaultLimit CPUShares) bool
- func LimitPodMem(pod *api.Pod, defaultLimit MegaBytes) bool
- type CPUShares
- func CPUForPod(pod *api.Pod, defaultLimit CPUShares) CPUShares
- func PodCPULimit(pod *api.Pod) CPUShares
- func (f *CPUShares) Set(s string) error
- func (f *CPUShares) String() string
- func (f *CPUShares) Type() string
- type MegaBytes
Constants ¶
const ( DefaultDefaultContainerCPULimit = CPUShares(0.25) // CPUs allocated for pods without CPU limit DefaultDefaultContainerMemLimit = MegaBytes(64.0) // memory allocated for pods without memory limit )
Functions ¶
func LimitPodCPU ¶
limitPodCPU sets DefaultContainerCPUs for the CPU limit of each container that does not limit its CPU resource yet. limitPodCPU returns true if and only if at least one container had no CPU limit set.
func LimitPodMem ¶
limitPodMem sets DefaultContainerMem for the memory limit of each container that does not limit its memory resource yet. limitPodMem returns true if and only if at least one container had no memory limit set.
Types ¶
type CPUShares ¶
type CPUShares float64
func CPUForPod ¶
CPUForPod computes the limits from the spec plus the default CPU limit for unlimited containers
func PodCPULimit ¶
CPUFromPodSpec computes the cpu shares that the pod is admitted to use. Containers without CPU limit are NOT taken into account.
func (*CPUShares) Set ¶
func (*CPUShares) String ¶
func (*CPUShares) Type ¶
type MegaBytes ¶
type MegaBytes float64
func MemForPod ¶
MemForPod computes the limits from the spec plus the default memory limit for unlimited containers
func PodMemLimit ¶
MemFromPodSpec computes the amount of memory that the pod is admitted to use. Containers without memory limit are NOT taken into account.
func (*MegaBytes) Set ¶
func (*MegaBytes) String ¶
func (*MegaBytes) Type ¶
Source Files ¶
doc.go resource.go types.go
- Version
- v1.1.4-beta.0
- Published
- Dec 7, 2015
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 12 minutes ago –
Tools for package owners.