mirror of https://github.com/kubernetes/kops.git
set num-nodes flag automatically (#16176)
Co-authored-by: upodroid <upodroid@users.noreply.github.com>
This commit is contained in:
parent
32febfeb01
commit
2cd79934d5
|
|
@ -26,7 +26,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
skipRegexBase = "\\[Slow\\]|\\[Serial\\]|\\[Disruptive\\]|\\[Flaky\\]|\\[Feature:.+\\]|nfs|NFS|Gluster"
|
||||
skipRegexBase = "\\[Slow\\]|\\[Serial\\]|\\[Disruptive\\]|\\[Flaky\\]|\\[Feature:.+\\]|nfs|NFS|Gluster|NodeProblemDetector"
|
||||
)
|
||||
|
||||
func (t *Tester) setSkipRegexFlag() error {
|
||||
|
|
@ -81,6 +81,8 @@ func (t *Tester) setSkipRegexFlag() error {
|
|||
skipRegex += "|same.hostPort.but.different.hostIP.and.protocol"
|
||||
// https://github.com/cilium/cilium/issues/9207
|
||||
skipRegex += "|serve.endpoints.on.same.port.and.different.protocols"
|
||||
// https://github.com/kubernetes/kubernetes/blob/418ae605ec1b788d43bff7ac44af66d8b669b833/test/e2e/network/networking.go#L135
|
||||
skipRegex += "|should.check.kube-proxy.urls"
|
||||
|
||||
if isPre28 {
|
||||
// These may be fixed in Cilium 1.13 but skipping for now
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/octago/sflags/gen/gpflag"
|
||||
|
|
@ -187,11 +188,6 @@ func (t *Tester) addNodeIG() error {
|
|||
return err
|
||||
}
|
||||
|
||||
// Skip this function for non gce clusters
|
||||
if cluster.Spec.LegacyCloudProvider != "gce" {
|
||||
return nil
|
||||
}
|
||||
|
||||
igs, err := kops.GetInstanceGroups("kops", cluster.Name, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -203,6 +199,15 @@ func (t *Tester) addNodeIG() error {
|
|||
ig = v
|
||||
}
|
||||
}
|
||||
numNodes := int(*ig.Spec.MaxSize) // we assume that MinSize = Maxsize, this is true for e2e testing
|
||||
klog.Infof("Setting -num-nodes=%v", numNodes)
|
||||
t.TestArgs += " -num-nodes=" + strconv.Itoa(numNodes)
|
||||
|
||||
// Skip the rest of this function for non gce clusters
|
||||
if cluster.Spec.LegacyCloudProvider != "gce" {
|
||||
return nil
|
||||
}
|
||||
|
||||
nodeTag := gce.TagForRole(cluster.ObjectMeta.Name, unversioned.InstanceGroupRoleNode)
|
||||
klog.Infof("Setting --node-tag=%s", nodeTag)
|
||||
t.TestArgs += " --node-tag=" + nodeTag
|
||||
|
|
|
|||
Loading…
Reference in New Issue