nodeports usage should be part of LoadBalancer service type

pull/6/head
zhouhaibing089 2017-01-03 16:28:08 +08:00 committed by haibzhou
parent f6e596d468
commit 381aaab1ee
1 changed files with 3 additions and 1 deletions

View File

@ -141,7 +141,9 @@ func (p *serviceEvaluator) Usage(item runtime.Object) (api.ResourceList, error)
value := resource.NewQuantity(int64(ports), resource.DecimalSI)
result[api.ResourceServicesNodePorts] = *value
case api.ServiceTypeLoadBalancer:
// load balancer services need to count load balancers
// load balancer services need to count node ports and load balancers
value := resource.NewQuantity(int64(ports), resource.DecimalSI)
result[api.ResourceServicesNodePorts] = *value
result[api.ResourceServicesLoadBalancers] = *(resource.NewQuantity(1, resource.DecimalSI))
}
return result, nil