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:16 UTC

[camel-k] branch master updated (071e80e -> 7ff682f)

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

nferraro pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git.


    from 071e80e  chore(deps): bump js-yaml from 3.12.0 to 3.13.1 in /docs
     new df9e920  Support KUBECONF env variable
     new 7ff682f  Use KUBECONF property in test

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 e2e/test_support.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


[camel-k] 02/02: Use KUBECONF property in test

Posted by nf...@apache.org.
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 7ff682fb7b118e667e413a225dd01d9647be5195
Author: Jan <jb...@redhat.com>
AuthorDate: Mon Nov 25 06:42:33 2019 +0100

    Use KUBECONF property in test
---
 e2e/test_support.go  | 3 ++-
 pkg/client/client.go | 3 ---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/e2e/test_support.go b/e2e/test_support.go
index f9a7e3b..1be93c3 100644
--- a/e2e/test_support.go
+++ b/e2e/test_support.go
@@ -41,6 +41,7 @@ import (
 	"github.com/google/uuid"
 	"github.com/onsi/gomega"
 	projectv1 "github.com/openshift/api/project/v1"
+	"github.com/operator-framework/operator-sdk/pkg/k8sutil"
 	"github.com/spf13/cobra"
 	appsv1 "k8s.io/api/apps/v1"
 	v1 "k8s.io/api/core/v1"
@@ -79,7 +80,7 @@ func init() {
 }
 
 func newTestClient() (client.Client, error) {
-	return client.NewOutOfClusterClient("")
+	return client.NewOutOfClusterClient(os.Getenv(k8sutil.KubeConfigEnvVar))
 }
 
 func kamel(args ...string) *cobra.Command {
diff --git a/pkg/client/client.go b/pkg/client/client.go
index c72d803..55ddf41 100644
--- a/pkg/client/client.go
+++ b/pkg/client/client.go
@@ -164,9 +164,6 @@ 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


[camel-k] 01/02: Support KUBECONF env variable

Posted by nf...@apache.org.
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