Merge pull request #11879 from rifelpet/node-os-arch

Kubetest2 - set node-os-arch flag instead of skipping kubectl test on arm64
This commit is contained in:
Kubernetes Prow Robot 2021-06-27 21:31:25 -07:00 committed by GitHub
commit 0432737d43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 11 deletions

View File

@ -70,17 +70,6 @@ func (t *Tester) setSkipRegexFlag() error {
}
}
igs, err := t.getKopsInstanceGroups()
if err != nil {
return err
}
for _, ig := range igs {
if strings.Contains(ig.Spec.Image, "arm64") {
skipRegex += "|Simple.pod.should.handle.in-cluster.config"
break
}
}
// Ensure it is valid regex
if _, err := regexp.Compile(skipRegex); err != nil {
return err

View File

@ -302,6 +302,21 @@ func (t *Tester) getZones() ([]string, error) {
return zoneNames, nil
}
func (t *Tester) addNodeOSArchFlag() error {
igs, err := t.getKopsInstanceGroups()
if err != nil {
return err
}
for _, ig := range igs {
if strings.Contains(ig.Spec.Image, "arm64") {
klog.Info("Setting --node-os-arch=arm64")
t.TestArgs += " --node-os-arch=arm64"
break
}
}
return nil
}
func (t *Tester) execute() error {
fs, err := gpflag.Parse(t)
if err != nil {
@ -355,6 +370,10 @@ func (t *Tester) execute() error {
return err
}
if err := t.addNodeOSArchFlag(); err != nil {
return err
}
return t.Test()
}