From f68fd3b2740b9f4bc2b110ac5739330ed34ec989 Mon Sep 17 00:00:00 2001 From: liz Date: Wed, 11 Jul 2018 16:37:34 -0400 Subject: [PATCH] Code review feedback Signed-off-by: liz --- cmd/sonobuoy/app/gen.go | 5 ++--- pkg/config/config.go | 15 +++++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/cmd/sonobuoy/app/gen.go b/cmd/sonobuoy/app/gen.go index d32a17e06..9fd4b5e57 100644 --- a/cmd/sonobuoy/app/gen.go +++ b/cmd/sonobuoy/app/gen.go @@ -93,12 +93,11 @@ func (g *genFlags) Config() (*client.GenConfig, error) { if err != nil { if errors.Cause(err) == ErrImageVersionNoClient { return nil, errors.Wrap(err, kubeError.Error()) - } else { - return nil, err } + return nil, err } - image = fmt.Sprintf(config.DefaultKubeConformanceImage, imageVersion) + image = config.DefaultKubeConformanceImageURL + ":" + imageVersion } return &client.GenConfig{ diff --git a/pkg/config/config.go b/pkg/config/config.go index fc9b4642e..1008ba579 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -29,8 +29,11 @@ import ( const ( // DefaultNamespace is the namespace where the master and plugin workers will run (but not necessarily the pods created by the plugin workers). DefaultNamespace = "heptio-sonobuoy" - // DefaultKubeConformanceImage is the URL of the docker image to run for the kube conformance tests. - DefaultKubeConformanceImage = "gcr.io/heptio-images/kube-conformance:%s" + + // DefaultKubeConformanceImageURL is the URL of the docker image to run for the kube conformance tests. + DefaultKubeConformanceImageURL = "gcr.io/heptio-images/kube-conformance" + // DefaultKubeConformanceImageTag is the default tag of the conformance image + DefaultKubeConformanceImageTag = "latest" // DefaultAggregationServerBindPort is the default port for the aggregation server to bind to. DefaultAggregationServerBindPort = 8080 // DefaultAggregationServerBindAddress is the default address for the aggregation server to bind to. @@ -43,8 +46,12 @@ const ( MasterResultsPath = "/tmp/sonobuoy" ) -// DefaultImage is the URL of the docker image to run for the aggregator and workers -var DefaultImage = "gcr.io/heptio-images/sonobuoy:" + buildinfo.Version +var ( + // DefaultKubeConformanceImage is the URL and tag of the docker image to run for the kube conformance tests. + DefaultKubeConformanceImage = DefaultKubeConformanceImageURL + ":" + DefaultKubeConformanceImageTag + // DefaultImage is the URL of the docker image to run for the aggregator and workers + DefaultImage = "gcr.io/heptio-images/sonobuoy:" + buildinfo.Version +) /////////////////////////////////////////////////////// // Note: The described resources are a 1:1 match