From 7396106143e96a5f62a9aff654fda42ce199dc8e Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Mon, 15 Oct 2018 01:23:21 -0700 Subject: [PATCH] *: add "KUBEINKS_E2E_IMAGE" Signed-off-by: Gyuho Lee --- README.md | 3 ++- cmd/awstester/eks/prow.go | 5 +++-- eksconfig/config.go | 2 ++ internal/eks/alb/alb_prow.go | 9 +++++++-- internal/eks/alb/alb_prow_test.go | 1 + 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9148e489e..6b5fff481 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,8 @@ GINKGO_TIMEOUT=10h \ AWSTESTER_EKS_EMBEDDED=true \ AWSTESTER_EKS_WAIT_BEFORE_DOWN=10m \ AWSTESTER_EKS_DOWN=true \ - AWSTESTER_EKS_AWSTESTER_IMAGE=[YOUR_AWS_ACCOUNT_ID].dkr.ecr.us-west-2.amazonaws.com/awstester:[BUILT_TAG] \ + AWSTESTER_EKS_KUBEKINS_E2E_IMAGE=[ACCOUNT_ID].dkr.ecr.us-west-2.amazonaws.com/kubekins-e2e:[TAG] \ + AWSTESTER_EKS_AWSTESTER_IMAGE=[ACCOUNT_ID].dkr.ecr.us-west-2.amazonaws.com/awstester:[TAG] \ AWSTESTER_EKS_WORKER_NODE_INSTANCE_TYPE=c5.xlarge \ AWSTESTER_EKS_WORKER_NODE_ASG_MIN=5 \ AWSTESTER_EKS_WORKER_NODE_ASG_MAX=5 \ diff --git a/cmd/awstester/eks/prow.go b/cmd/awstester/eks/prow.go index 797c6a77f..7891f4957 100644 --- a/cmd/awstester/eks/prow.go +++ b/cmd/awstester/eks/prow.go @@ -110,9 +110,10 @@ func prowALBFunc(cmd *cobra.Command, args []string) { AWSTESTER_EKS_WAIT_BEFORE_DOWN: fmt.Sprintf("%v", cfg.WaitBeforeDown), AWSTESTER_EKS_DOWN: fmt.Sprintf("%v", cfg.Down), - AWSTESTER_EKS_AWSTESTER_IMAGE: fmt.Sprintf("%v", cfg.AWSTesterImage), + AWSTESTER_EKS_KUBEKINS_E2E_IMAGE: fmt.Sprintf("%s", cfg.KubekinsE2E), + AWSTESTER_EKS_AWSTESTER_IMAGE: fmt.Sprintf("%s", cfg.AWSTesterImage), - AWSTESTER_EKS_WORKER_NODE_INSTANCE_TYPE: fmt.Sprintf("%v", cfg.WorkerNodeInstanceType), + AWSTESTER_EKS_WORKER_NODE_INSTANCE_TYPE: fmt.Sprintf("%s", cfg.WorkerNodeInstanceType), AWSTESTER_EKS_WORKER_NODE_ASG_MIN: fmt.Sprintf("%d", cfg.WorkderNodeASGMin), AWSTESTER_EKS_WORKER_NODE_ASG_MAX: fmt.Sprintf("%d", cfg.WorkderNodeASGMax), diff --git a/eksconfig/config.go b/eksconfig/config.go index bcd9f2940..b8a01d3af 100644 --- a/eksconfig/config.go +++ b/eksconfig/config.go @@ -15,6 +15,8 @@ import ( // Config defines EKS testing configuration. type Config struct { + // KubekinsE2E is the custom-built Kubernetes e2e test container image. + KubekinsE2E string `json:"kubekins-e2e-image,omitempty"` // AWSTesterImage is the awstester container image. // Required for "awstester ingress server" for ALB Ingress Controller tests. AWSTesterImage string `json:"awstester-image,omitempty"` diff --git a/internal/eks/alb/alb_prow.go b/internal/eks/alb/alb_prow.go index c18cb2590..2623230b5 100644 --- a/internal/eks/alb/alb_prow.go +++ b/internal/eks/alb/alb_prow.go @@ -16,7 +16,8 @@ type ConfigProwJobYAML struct { AWSTESTER_EKS_WAIT_BEFORE_DOWN string AWSTESTER_EKS_DOWN string - AWSTESTER_EKS_AWSTESTER_IMAGE string + AWSTESTER_EKS_KUBEKINS_E2E_IMAGE string + AWSTESTER_EKS_AWSTESTER_IMAGE string AWSTESTER_EKS_WORKER_NODE_INSTANCE_TYPE string AWSTESTER_EKS_WORKER_NODE_ASG_MIN string @@ -101,7 +102,11 @@ func CreateProwJobYAML(cfg ConfigProwJobYAML) (string, error) { Spec: &v1.PodSpec{ Containers: []v1.Container{ { - Image: "gcr.io/k8s-testimages/kubekins-e2e:v20181005-fd9cfb8b0-master", + // Image: "gcr.io/k8s-testimages/kubekins-e2e:v20181005-fd9cfb8b0-master", + + // use custom built image to include "wrk", "awstester", etc. + // e.g. 607362164682.dkr.ecr.us-west-2.amazonaws.com/kubekins-e2e:ade682b5fc04 + Image: cfg.AWSTESTER_EKS_KUBEKINS_E2E_IMAGE, Args: []string{ "--repo=github.com/gyuho/$(REPO_NAME)=$(PULL_REFS)", diff --git a/internal/eks/alb/alb_prow_test.go b/internal/eks/alb/alb_prow_test.go index eeecf6acd..7914ac42a 100644 --- a/internal/eks/alb/alb_prow_test.go +++ b/internal/eks/alb/alb_prow_test.go @@ -11,6 +11,7 @@ func TestALBProw(t *testing.T) { GINKGO_VERBOSE: "true", AWSTESTER_EKS_WAIT_BEFORE_DOWN: "1m", AWSTESTER_EKS_DOWN: "true", + AWSTESTER_EKS_KUBEKINS_E2E_IMAGE: "ACCOUNT-ID.dkr.ecr.us-west-2.amazonaws.com/kubekins-e2e:latest", AWSTESTER_EKS_AWSTESTER_IMAGE: "ACCOUNT-ID.dkr.ecr.us-west-2.amazonaws.com/awstester:latest", AWSTESTER_EKS_WORKER_NODE_INSTANCE_TYPE: "m3.xlarge", AWSTESTER_EKS_WORKER_NODE_ASG_MIN: "1",