Add a resource specifying number of Pods that are allowed to run on Kubelet.

This commit is contained in:
gmarek
2015-03-17 15:43:49 +01:00
parent f57f317830
commit 27d660d0ac
9 changed files with 109 additions and 21 deletions

View File

@@ -41,6 +41,13 @@ func (self *ResourceList) Memory() *resource.Quantity {
return &resource.Quantity{}
}
func (self *ResourceList) MaxPods() *resource.Quantity {
if val, ok := (*self)[ResourceMaxPods]; ok {
return &val
}
return &resource.Quantity{}
}
func GetContainerStatus(statuses []ContainerStatus, name string) (ContainerStatus, bool) {
for i := range statuses {
if statuses[i].Name == name {