Files
kubeshark/cmd/installRunner.go
M. Mert Yildiran cb60a4cc4c 🔨 Move cli folder contents into project root (#1253)
* Remove `logger` module

* Remove `shared` module

* Move `cli` folder contents into project root

* Fix linter

* Change the module name from `github.com/kubeshark/kubeshark/cli` to `github.com/kubeshark/kubeshark`

* Set the default `Makefile` rule to `build`

* Add `lint` rule

* Fix the linter errors
2022-11-26 01:17:50 +03:00

34 lines
964 B
Go

package cmd
import (
"fmt"
"log"
"strings"
"github.com/kubeshark/kubeshark/bucket"
"github.com/kubeshark/kubeshark/config"
)
func runKubesharkInstall() {
// TODO: Remove this function
if config.Config.Install.Out {
bucketProvider := bucket.NewProvider(config.Config.Install.TemplateUrl, bucket.DefaultTimeout)
installTemplate, err := bucketProvider.GetInstallTemplate(config.Config.Install.TemplateName)
if err != nil {
log.Printf("Failed getting install template, err: %v", err)
return
}
fmt.Print(installTemplate)
return
}
var sb strings.Builder
sb.WriteString("Hello! This command can be used to install Kubeshark Pro edition on your Kubernetes cluster.")
sb.WriteString("\nPlease run:")
sb.WriteString("\n\tkubeshark install -o | kubectl apply -n kubeshark -f -")
sb.WriteString("\n\nor use helm chart as described in https://getkubeshark.io/docs/installing-kubeshark/centralized-installation\n")
fmt.Print(sb.String())
}