package resource
import "k8s.io/kubernetes/contrib/mesos/pkg/scheduler/resource"
Package resource contains the Mesos scheduler specific resource functions
Index ¶
- Constants
- type CPUShares
- func LimitPodCPU(pod *api.Pod, defaultLimit CPUShares) (request, limit CPUShares, modified bool, err error)
- func LimitedCPUForPod(pod *api.Pod, defaultLimit CPUShares) (request, limit CPUShares, modified bool, err error)
- func NewCPUShares(q resource.Quantity) CPUShares
- func (f CPUShares) Quantity() *resource.Quantity
- func (f *CPUShares) Set(s string) error
- func (f CPUShares) String() string
- func (f CPUShares) Type() string
- type MegaBytes
- func LimitPodMem(pod *api.Pod, defaultLimit MegaBytes) (request, limit MegaBytes, modified bool, err error)
- func LimitedMemForPod(pod *api.Pod, defaultLimit MegaBytes) (request, limit MegaBytes, modified bool, err error)
- func NewMegaBytes(q resource.Quantity) MegaBytes
- func (f MegaBytes) Quantity() *resource.Quantity
- func (f *MegaBytes) Set(s string) error
- func (f MegaBytes) String() string
- func (f MegaBytes) Type() string
Constants ¶
const ( DefaultDefaultContainerCPULimit = CPUShares(0.25) // CPUs allocated for pods without CPU limit DefaultDefaultContainerMemLimit = MegaBytes(64.0) // memory allocated for pods without memory limit MinimumContainerCPU = CPUShares(0.01) // minimum CPUs allowed by Mesos MinimumContainerMem = MegaBytes(32.0) // minimum memory allowed by Mesos )
Types ¶
type CPUShares ¶
type CPUShares float64
func LimitPodCPU ¶
func LimitPodCPU(pod *api.Pod, defaultLimit CPUShares) (request, limit CPUShares, modified bool, err error)
LimitPodCPU sets default CPU requests and limits of each container that does not limit its CPU resource yet. LimitPodCPU returns the new request, limit and whether the pod was modified.
func LimitedCPUForPod ¶
func LimitedCPUForPod(pod *api.Pod, defaultLimit CPUShares) (request, limit CPUShares, modified bool, err error)
LimitedCPUForPod computes the limits from the spec plus the default CPU limit difference for unlimited containers
func NewCPUShares ¶
func (CPUShares) Quantity ¶
func (*CPUShares) Set ¶
func (CPUShares) String ¶
func (CPUShares) Type ¶
type MegaBytes ¶
type MegaBytes float64
func LimitPodMem ¶
func LimitPodMem(pod *api.Pod, defaultLimit MegaBytes) (request, limit MegaBytes, modified bool, err error)
LimitPodMem sets default memory requests and limits of each container that does not limit its memory resource yet. LimitPodMem returns the new request, limit and whether the pod was modified.
func LimitedMemForPod ¶
func LimitedMemForPod(pod *api.Pod, defaultLimit MegaBytes) (request, limit MegaBytes, modified bool, err error)
LimitedMemForPod computes the limits from the spec plus the default memory limit difference for unlimited containers
func NewMegaBytes ¶
func (MegaBytes) Quantity ¶
func (*MegaBytes) Set ¶
func (MegaBytes) String ¶
func (MegaBytes) Type ¶
Source Files ¶
doc.go resource.go types.go
- Version
- v1.2.0-alpha.6
- Published
- Jan 13, 2016
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 59 seconds ago –
Tools for package owners.