Skip to content

Commit

Permalink
nodeports usage should be part of LoadBalancer service type
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouhaibing089 committed Jan 3, 2017
1 parent f6e596d commit 381aaab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/quota/evaluator/core/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 381aaab

Please sign in to comment.