You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2023/01/12 23:56:06 UTC

[skywalking-infra-e2e] branch main updated: Export the kubeconfig path during executing the following steps. (#99)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-infra-e2e.git


The following commit(s) were added to refs/heads/main by this push:
     new 2631e76  Export the kubeconfig path during executing the following steps. (#99)
2631e76 is described below

commit 2631e76926604c4e30ca170bed916804c86980b6
Author: Ye Cao <da...@gmail.com>
AuthorDate: Fri Jan 13 07:56:00 2023 +0800

    Export the kubeconfig path during executing the following steps. (#99)
---
 internal/components/setup/kind.go | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/internal/components/setup/kind.go b/internal/components/setup/kind.go
index 039d0f9..4fe24a4 100644
--- a/internal/components/setup/kind.go
+++ b/internal/components/setup/kind.go
@@ -106,6 +106,13 @@ func KindSetup(e2eConfig *config.E2EConfig) error {
 		if err := createKindCluster(kindConfigPath, e2eConfig); err != nil {
 			return err
 		}
+	} else {
+		// export the kubeconfig path for command line
+		err := os.Setenv("KUBECONFIG", kubeConfigPath)
+		if err != nil {
+			return fmt.Errorf("could not export kubeconfig file path, %v", err)
+		}
+		logger.Log.Infof("export KUBECONFIG=%s", kubeConfigPath)
 	}
 
 	// import images