You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2019/11/25 15:35:17 UTC
[camel-k] 01/02: Support KUBECONF env variable
This is an automated email from the ASF dual-hosted git repository.
nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit df9e9203af343d1e9c20382a8ee3b417aca69a22
Author: Jan <jb...@redhat.com>
AuthorDate: Fri Nov 22 15:11:01 2019 +0100
Support KUBECONF env variable
---
pkg/client/client.go | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pkg/client/client.go b/pkg/client/client.go
index 55ddf41..c72d803 100644
--- a/pkg/client/client.go
+++ b/pkg/client/client.go
@@ -164,6 +164,9 @@ func initialize(kubeconfig string) {
}
func getDefaultKubeConfigFile() (string, error) {
+ if os.Getenv(k8sutil.KubeConfigEnvVar) != "" {
+ return os.Getenv(k8sutil.KubeConfigEnvVar), nil
+ }
usr, err := user.Current()
if err != nil {
return "", err