From 381aaab1eedb2e502000aeb260b1bc7ea4121341 Mon Sep 17 00:00:00 2001 From: zhouhaibing089 Date: Tue, 3 Jan 2017 16:28:08 +0800 Subject: [PATCH] nodeports usage should be part of LoadBalancer service type --- pkg/quota/evaluator/core/services.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/quota/evaluator/core/services.go b/pkg/quota/evaluator/core/services.go index 0b60897a1675b..e4249824a15db 100644 --- a/pkg/quota/evaluator/core/services.go +++ b/pkg/quota/evaluator/core/services.go @@ -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