Update the related tests

1. add AllocateLoadBalancerNodePorts fields in specs for validation test cases
2. update fuzzer
3. in resource quota e2e, allocate node port for loadbalancer type service and
   exceed the node port quota

Signed-off-by: Hanlin Shi <shihanlin9@gmail.com>
This commit is contained in:
Hanlin Shi
2021-03-19 19:33:56 +00:00
parent 05c6eaf0d1
commit 24592ca989
5 changed files with 117 additions and 30 deletions

View File

@@ -31,6 +31,7 @@ import (
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/kubernetes/pkg/apis/core"
utilpointer "k8s.io/utils/pointer"
)
// Funcs returns the fuzzer functions for the core group.
@@ -518,6 +519,9 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
case core.ServiceAffinityNone:
ss.SessionAffinityConfig = nil
}
if ss.AllocateLoadBalancerNodePorts == nil {
ss.AllocateLoadBalancerNodePorts = utilpointer.BoolPtr(true)
}
},
func(s *core.NodeStatus, c fuzz.Continue) {
c.FuzzNoCustom(s)