Add service.spec.AllocateLoadBalancerNodePorts

This commit is contained in:
Lars Ekman
2020-11-04 07:30:15 +01:00
parent 0e0cc1ead8
commit 1f4d852f2f
9 changed files with 240 additions and 2 deletions

View File

@@ -11169,6 +11169,13 @@ func TestValidateServiceCreate(t *testing.T) {
},
numErrs: 1,
},
{
name: "Use AllocateLoadBalancerNodePorts when type is not LoadBalancer",
tweakSvc: func(s *core.Service) {
s.Spec.AllocateLoadBalancerNodePorts = utilpointer.BoolPtr(true)
},
numErrs: 1,
},
}
for _, tc := range testCases {
@@ -13539,6 +13546,13 @@ func TestValidateServiceUpdate(t *testing.T) {
},
numErrs: 1,
},
{
name: "Set AllocateLoadBalancerNodePorts when type is not LoadBalancer",
tweakSvc: func(oldSvc, newSvc *core.Service) {
newSvc.Spec.AllocateLoadBalancerNodePorts = utilpointer.BoolPtr(true)
},
numErrs: 1,
},
}
for _, tc := range testCases {