Fix typo in apply workloads 96/1196/1
authorYolanda Robla <yroblamo@redhat.com>
Tue, 16 Jul 2019 12:16:56 +0000 (14:16 +0200)
committerYolanda Robla <yroblamo@redhat.com>
Tue, 16 Jul 2019 12:16:56 +0000 (14:16 +0200)
The env var is not KUBECONFIG_PATH but KUBECONFIG

Signed-off-by: Yolanda Robla <yroblamo@redhat.com>
Change-Id: I43b29d5dc0e3cf9565a6fc5bedc5226f78a9045c

pkg/utils/utils.go

index 2e25c20..b9128c5 100644 (file)
@@ -68,7 +68,7 @@ func ApplyKubectl(kubectlBinary string, kubectlContent []byte, kubeconfigPath st
                os.Exit(1)
        }
 
-       envVars := []string{fmt.Sprintf("KUBECONFIG_PATH=%s", kubeconfigPath)}
+       envVars := []string{fmt.Sprintf("KUBECONFIG=%s", kubeconfigPath)}
        for i := 1; i <= 10; i++ {
                _, err := ExecuteCommand("", envVars, false, true, kubectlBinary, "apply", "-f", tmpFile.Name())
 
@@ -76,7 +76,7 @@ func ApplyKubectl(kubectlBinary string, kubectlContent []byte, kubeconfigPath st
                        // it is ok, stop the loop
                        break
                } else {
-                       log.Println(err)
+                       log.Println(string(err))
                        // sleep and retry
                        time.Sleep(60 * time.Second)
                }