File tree 2 files changed +12
-10
lines changed
tests/e2e/kubetest2-kops/deployer
2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,12 @@ import (
20
20
"errors"
21
21
"fmt"
22
22
"os"
23
- "path"
24
23
"path/filepath"
25
24
"strings"
26
25
"time"
27
26
28
27
"k8s.io/klog/v2"
29
28
"k8s.io/kops/tests/e2e/kubetest2-kops/gce"
30
- "k8s.io/kops/tests/e2e/pkg/kops"
31
29
"k8s.io/kops/tests/e2e/pkg/target"
32
30
"k8s.io/kops/tests/e2e/pkg/util"
33
31
"sigs.k8s.io/kubetest2/pkg/boskos"
@@ -51,14 +49,6 @@ func (d *deployer) initialize() error {
51
49
return fmt .Errorf ("init failed to check up flags: %v" , err )
52
50
}
53
51
}
54
- if d .KopsVersionMarker != "" {
55
- d .KopsBinaryPath = path .Join (d .commonOptions .RunDir (), "kops" )
56
- baseURL , err := kops .DownloadKops (d .KopsVersionMarker , d .KopsBinaryPath )
57
- if err != nil {
58
- return fmt .Errorf ("init failed to download kops from url: %v" , err )
59
- }
60
- d .KopsBaseURL = baseURL
61
- }
62
52
63
53
switch d .CloudProvider {
64
54
case "aws" :
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import (
20
20
"errors"
21
21
"fmt"
22
22
osexec "os/exec"
23
+ "path"
23
24
"strings"
24
25
"time"
25
26
@@ -41,6 +42,17 @@ func (d *deployer) Up() error {
41
42
return err
42
43
}
43
44
45
+ // kops is fetched when --up is called instead of init to support a scenario where k/k is being built
46
+ // and a kops build is not ready yet
47
+ if d .KopsVersionMarker != "" {
48
+ d .KopsBinaryPath = path .Join (d .commonOptions .RunDir (), "kops" )
49
+ baseURL , err := kops .DownloadKops (d .KopsVersionMarker , d .KopsBinaryPath )
50
+ if err != nil {
51
+ return fmt .Errorf ("init failed to download kops from url: %v" , err )
52
+ }
53
+ d .KopsBaseURL = baseURL
54
+ }
55
+
44
56
if d .terraform == nil {
45
57
klog .Info ("Cleaning up any leaked resources from previous cluster" )
46
58
// Intentionally ignore errors:
You can’t perform that action at this time.
0 commit comments