Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions tests/e2e/kubetest2-kops/deployer/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ import (
"errors"
"fmt"
"os"
"path"
"path/filepath"
"strings"
"time"

"k8s.io/klog/v2"
"k8s.io/kops/tests/e2e/kubetest2-kops/gce"
"k8s.io/kops/tests/e2e/pkg/kops"
"k8s.io/kops/tests/e2e/pkg/target"
"k8s.io/kops/tests/e2e/pkg/util"
"sigs.k8s.io/kubetest2/pkg/boskos"
Expand All @@ -51,14 +49,6 @@ func (d *deployer) initialize() error {
return fmt.Errorf("init failed to check up flags: %v", err)
}
}
if d.KopsVersionMarker != "" {
d.KopsBinaryPath = path.Join(d.commonOptions.RunDir(), "kops")
baseURL, err := kops.DownloadKops(d.KopsVersionMarker, d.KopsBinaryPath)
if err != nil {
return fmt.Errorf("init failed to download kops from url: %v", err)
}
d.KopsBaseURL = baseURL
}

switch d.CloudProvider {
case "aws":
Expand Down
13 changes: 13 additions & 0 deletions tests/e2e/kubetest2-kops/deployer/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"errors"
"fmt"
osexec "os/exec"
"path"
"strings"
"time"

Expand All @@ -41,6 +42,17 @@ func (d *deployer) Up() error {
return err
}

// kops is fetched when --up is called instead of init to support a scenario where k/k is being built
// and a kops build is not ready yet
if d.KopsVersionMarker != "" {
d.KopsBinaryPath = path.Join(d.commonOptions.RunDir(), "kops")
baseURL, err := kops.DownloadKops(d.KopsVersionMarker, d.KopsBinaryPath)
if err != nil {
return fmt.Errorf("init failed to download kops from url: %v", err)
}
d.KopsBaseURL = baseURL
}

if d.terraform == nil {
klog.Info("Cleaning up any leaked resources from previous cluster")
// Intentionally ignore errors:
Expand Down Expand Up @@ -118,6 +130,7 @@ func (d *deployer) createCluster(zones []string, adminAccess string, yes bool) e
"--kubernetes-version", d.KubernetesVersion,
"--ssh-public-key", d.SSHPublicKeyPath,
"--set", "cluster.spec.nodePortAccess=0.0.0.0/0",
"--set", `spec.containerd.configAdditions=plugins."io.containerd.grpc.v1.cri".containerd.runtimes.test-handler.runtime_type=io.containerd.runc.v2`,
}
if yes {
args = append(args, "--yes")
Expand Down