mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Merge pull request #42998 from derekwaynecarr/quota-test
Automatic merge from submit-queue Unit test quota for nodeport associated with loadbalancer **What this PR does / why we need it**: This PR adds unit tests to ensure node ports associated with loadbalancers are charged to quota appropriately. The original PR that added that feature to quota lacked a unit test (https://github.com/kubernetes/kubernetes/pull/39364)
This commit is contained in:
commit
1db60e5d55
@ -67,6 +67,23 @@ func TestServiceEvaluatorUsage(t *testing.T) {
|
|||||||
api.ResourceServices: resource.MustParse("1"),
|
api.ResourceServices: resource.MustParse("1"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"loadbalancer_ports": {
|
||||||
|
service: &api.Service{
|
||||||
|
Spec: api.ServiceSpec{
|
||||||
|
Type: api.ServiceTypeLoadBalancer,
|
||||||
|
Ports: []api.ServicePort{
|
||||||
|
{
|
||||||
|
Port: 27443,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
usage: api.ResourceList{
|
||||||
|
api.ResourceServicesNodePorts: resource.MustParse("1"),
|
||||||
|
api.ResourceServicesLoadBalancers: resource.MustParse("1"),
|
||||||
|
api.ResourceServices: resource.MustParse("1"),
|
||||||
|
},
|
||||||
|
},
|
||||||
"clusterip": {
|
"clusterip": {
|
||||||
service: &api.Service{
|
service: &api.Service{
|
||||||
Spec: api.ServiceSpec{
|
Spec: api.ServiceSpec{
|
||||||
|
Loading…
Reference in New Issue
Block a user