From 19de2a24b72bd65a1f3d17dc0271b4ea1e89639e Mon Sep 17 00:00:00 2001 From: Murat Kabilov Date: Tue, 26 Sep 2017 13:44:30 +0200 Subject: [PATCH] go lint --- pkg/cluster/k8sres.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/cluster/k8sres.go b/pkg/cluster/k8sres.go index 14ed17daf..041cd2f42 100644 --- a/pkg/cluster/k8sres.go +++ b/pkg/cluster/k8sres.go @@ -535,9 +535,11 @@ func (c *Cluster) generateMasterEndpoints(subsets []v1.EndpointSubset) *v1.Endpo func (c *Cluster) generateCloneEnvironment(description *spec.CloneDescription) []v1.EnvVar { result := make([]v1.EnvVar, 0) + if description.ClusterName == "" { return result } + cluster := description.ClusterName result = append(result, v1.EnvVar{Name: "CLONE_SCOPE", Value: cluster}) if description.EndTimestamp == "" { @@ -563,11 +565,11 @@ func (c *Cluster) generateCloneEnvironment(description *spec.CloneDescription) [ }) } else { // cloning with S3, find out the bucket to clone - clone_wal_s3_bucket := c.OpConfig.WALES3Bucket result = append(result, v1.EnvVar{Name: "CLONE_METHOD", Value: "CLONE_WITH_WALE"}) - result = append(result, v1.EnvVar{Name: "CLONE_WAL_S3_BUCKET", Value: clone_wal_s3_bucket}) + result = append(result, v1.EnvVar{Name: "CLONE_WAL_S3_BUCKET", Value: c.OpConfig.WALES3Bucket}) result = append(result, v1.EnvVar{Name: "CLONE_TARGET_TIME", Value: description.EndTimestamp}) } + return result }