Skip load balancer test in IPv6 clusters

This commit is contained in:
Peter Rifel 2021-09-30 14:49:26 -05:00
parent 0acebafc9a
commit eeda5f927d
No known key found for this signature in database
GPG Key ID: BC6469E5B16DB2B6
1 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,8 @@ package tester
import ( import (
"regexp" "regexp"
"strings" "strings"
"k8s.io/kops/upup/pkg/fi/utils"
) )
const ( const (
@ -76,6 +78,12 @@ func (t *Tester) setSkipRegexFlag() error {
skipRegex += "|should.be.mountable.when.non-attachable" skipRegex += "|should.be.mountable.when.non-attachable"
} }
if cluster.Spec.CloudProvider == "aws" && utils.IsIPv6CIDR(cluster.Spec.NonMasqueradeCIDR) {
// AWS VPC Classic ELBs are IPv4 only
// ref: https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-internet-facing-load-balancers.html#internet-facing-ip-addresses
skipRegex += "|should.not.disrupt.a.cloud.load-balancer.s.connectivity.during.rollout"
}
// Ensure it is valid regex // Ensure it is valid regex
if _, err := regexp.Compile(skipRegex); err != nil { if _, err := regexp.Compile(skipRegex); err != nil {
return err return err