diff --git a/pkg/client/cmd/install.go b/pkg/client/cmd/install.go index 98a7cd028c..27fa96f781 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 7ecae8e3ee..5934cc35c6 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",