Skip to content

Commit

Permalink
Temporarily hijack e2e presubmit test
Browse files Browse the repository at this point in the history
  • Loading branch information
rifelpet committed Sep 2, 2020
1 parent 2268fbd commit 09c3424
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions cmd/kops/create_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/klog/v2"
"k8s.io/kops/cmd/kops/util"
"k8s.io/kops/pkg/apis/kops"
api "k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/pkg/apis/kops/registry"
"k8s.io/kops/pkg/apis/kops/validation"
Expand Down Expand Up @@ -417,9 +418,38 @@ func RunCreateCluster(ctx context.Context, f *util.Factory, out io.Writer, c *Cr
group.Spec.Image = c.MasterImage
}
}
if c.NodeImage != "" {
{
// TODO: remove this before the PR is merged. Only using this to test w/ the E2E presubmits
var owner string
switch os.Getenv("KOPS_REGIONS") {
case "us-east-1":
owner = "092701018921"
case "us-west-2":
owner = "651937483462"
case "ap-south-1":
owner = "449901457613"
case "ap-northeast-2":
owner = "630172235254"
case "ap-southeast-1":
owner = "406264879685"
case "ap-southeast-2":
owner = "823100568288"
case "ap-northeast-1":
owner = "593245189075"
case "ca-central-1":
owner = "229026816814"
case "eu-central-1":
owner = "149721548608"
case "eu-west-2":
owner = "941016683700"
case "eu-north-1":
owner = "432623269467"
default:
klog.Fatal("unsupported region, try again")
}
for _, group := range nodes {
group.Spec.Image = c.NodeImage
group.Spec.Image = fmt.Sprintf("%v/bottlerocket-aws-k8s-1.17-x86_64-v0.5.0-e0ddf1b", owner)
group.Spec.ImageFamily = kops.ImageFamilyBottlerocket
}
}

Expand Down

0 comments on commit 09c3424

Please sign in to comment.