Skip to content

Commit

Permalink
Merge pull request #15683 from johngmyers/skip-ssh-private
Browse files Browse the repository at this point in the history
Skip ssh-to-all-nodes test in private topology
  • Loading branch information
k8s-ci-robot committed Jul 21, 2023
2 parents 59ced8c + be9325a commit b5caa76
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
7 changes: 4 additions & 3 deletions pkg/apis/kops/v1alpha2/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -710,9 +710,10 @@ type EtcdMemberSpec struct {
type SubnetType string

const (
SubnetTypePublic SubnetType = "Public"
SubnetTypePrivate SubnetType = "Private"
SubnetTypeUtility SubnetType = "Utility"
SubnetTypePublic SubnetType = "Public"
SubnetTypePrivate SubnetType = "Private"
SubnetTypeDualStack SubnetType = "DualStack"
SubnetTypeUtility SubnetType = "Utility"
)

type ClusterSubnetSpec struct {
Expand Down
9 changes: 6 additions & 3 deletions tests/e2e/pkg/tester/skip_regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package tester
import (
"regexp"

"k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/pkg/apis/kops/util"
"k8s.io/kops/pkg/apis/kops/v1alpha2"
"k8s.io/kops/upup/pkg/fi"
"k8s.io/kops/upup/pkg/fi/utils"
)
Expand Down Expand Up @@ -125,8 +125,11 @@ func (t *Tester) setSkipRegexFlag() error {
skipRegex += "|In-tree.Volumes.\\[Driver:.aws\\]"
}

if cluster.Spec.Topology != nil && cluster.Spec.Topology.Nodes == kops.TopologyPrivate {
skipRegex += "|SSH.should.SSH.to.all.nodes.and.run.commands"
for _, subnet := range cluster.Spec.Subnets {
if subnet.Type == v1alpha2.SubnetTypePrivate || subnet.Type == v1alpha2.SubnetTypeDualStack {
skipRegex += "|SSH.should.SSH.to.all.nodes.and.run.commands"
break
}
}

// Ensure it is valid regex
Expand Down

0 comments on commit b5caa76

Please sign in to comment.