From 3bf316e28f695ffbdbef947e1908d4ad9768e5e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Wei=C3=9Fe?= <66256922+daniel-weisse@users.noreply.github.com> Date: Mon, 21 Aug 2023 15:12:23 +0200 Subject: [PATCH] cli: add spinner to helm chart installation (#2270) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Weiße --- cli/internal/cmd/init.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cli/internal/cmd/init.go b/cli/internal/cmd/init.go index a47c4be3c..4f0f79dbd 100644 --- a/cli/internal/cmd/init.go +++ b/cli/internal/cmd/init.go @@ -255,17 +255,21 @@ func (i *initCmd) initialize(cmd *cobra.Command, newDialer func(validator atls.V if err != nil { return fmt.Errorf("getting Terraform output: %w", err) } + + i.log.Debugf("Loading Helm deployments") + i.spinner.Start("Installing Kubernetes components ", false) releases, err := helmLoader.LoadReleases(conf, flags.conformance, flags.helmWaitMode, masterSecret, serviceAccURI, idFile, output) if err != nil { return fmt.Errorf("loading Helm charts: %w", err) } - i.log.Debugf("Loaded Helm deployments") - if err != nil { - return fmt.Errorf("loading Helm charts: %w", err) - } + + i.log.Debugf("Installing Helm deployments") if err := i.helmInstaller.Install(cmd.Context(), releases); err != nil { return fmt.Errorf("installing Helm charts: %w", err) } + i.spinner.Stop() + i.log.Debugf("Helm deployment installation succeeded") + cmd.Println(bufferedOutput.String()) return nil }