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 2018/09/11 06:30:46 UTC

[camel-k] 02/02: remove import alias and fix naming

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 b62b092dd111815ca1fb290526a6d2463f37e8b2
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Tue Sep 11 08:00:28 2018 +0200

    remove import alias and fix naming
---
 pkg/client/cmd/install.go | 7 ++++---
 pkg/install/operator.go   | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/pkg/client/cmd/install.go b/pkg/client/cmd/install.go
index 98a7cd0..27fa96f 100644
--- a/pkg/client/cmd/install.go
+++ b/pkg/client/cmd/install.go
@@ -19,7 +19,8 @@ package cmd
 
 import (
 	"fmt"
-	installutils "github.com/apache/camel-k/pkg/install"
+
+	"github.com/apache/camel-k/pkg/install"
 	"github.com/spf13/cobra"
 	"k8s.io/apimachinery/pkg/api/errors"
 )
@@ -43,7 +44,7 @@ func NewCmdInstall(rootCmdOptions *RootCmdOptions) *cobra.Command {
 }
 
 func (o *InstallCmdOptions) install(cmd *cobra.Command, args []string) error {
-	err := installutils.SetupClusterwideResources()
+	err := install.SetupClusterwideResources()
 	if err != nil && errors.IsForbidden(err) {
 		// TODO explain that this is a one time operation and add a flag to do cluster-level operations only when logged as admin
 		fmt.Println("Current user is not authorized to create cluster-wide objects like custom resource definitions or cluster roles: ", err)
@@ -53,7 +54,7 @@ func (o *InstallCmdOptions) install(cmd *cobra.Command, args []string) error {
 
 	namespace := o.Namespace
 
-	err = installutils.InstallOperator(namespace)
+	err = install.Operator(namespace)
 	if err != nil {
 		return err
 	}
diff --git a/pkg/install/operator.go b/pkg/install/operator.go
index 7ecae8e..5934cc3 100644
--- a/pkg/install/operator.go
+++ b/pkg/install/operator.go
@@ -25,7 +25,7 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 )
 
-func InstallOperator(namespace string) error {
+func Operator(namespace string) error {
 	return installResources(namespace,
 		"operator-service-account.yaml",
 		"operator-role.yaml",