From 0e9165063120a1de9a45d0fb08ecf73067ee18b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Wei=C3=9Fe?= <66256922+daniel-weisse@users.noreply.github.com> Date: Mon, 4 Dec 2023 10:14:16 +0100 Subject: [PATCH] cli: fix helm-timeout flags for deprecated commands (#2676) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Weiße --- cli/internal/cmd/create.go | 2 +- cli/internal/cmd/init.go | 2 +- cli/internal/cmd/upgradeapply.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/internal/cmd/create.go b/cli/internal/cmd/create.go index 83d2c5c54..994c7e840 100644 --- a/cli/internal/cmd/create.go +++ b/cli/internal/cmd/create.go @@ -26,7 +26,7 @@ func NewCreateCmd() *cobra.Command { cmd.Flags().Bool("conformance", false, "") cmd.Flags().Bool("skip-helm-wait", false, "") cmd.Flags().Bool("merge-kubeconfig", false, "") - cmd.Flags().Duration("timeout", 5*time.Minute, "") + cmd.Flags().Duration("helm-timeout", 10*time.Minute, "") // Skip all phases but the infrastructure phase. cmd.Flags().StringSlice("skip-phases", allPhases(skipInfrastructurePhase), "") return runApply(cmd, args) diff --git a/cli/internal/cmd/init.go b/cli/internal/cmd/init.go index cc23abdf1..17b22d2fd 100644 --- a/cli/internal/cmd/init.go +++ b/cli/internal/cmd/init.go @@ -50,7 +50,7 @@ func NewInitCmd() *cobra.Command { // We always want to skip the infrastructure phase here, to be aligned with the // functionality of the old init command. cmd.Flags().StringSlice("skip-phases", []string{string(skipInfrastructurePhase)}, "") - cmd.Flags().Duration("timeout", time.Hour, "") + cmd.Flags().Duration("helm-timeout", 10*time.Minute, "") return runApply(cmd, args) }, Deprecated: "use 'constellation apply' instead.", diff --git a/cli/internal/cmd/upgradeapply.go b/cli/internal/cmd/upgradeapply.go index a5ce7e0fa..e6086a3e7 100644 --- a/cli/internal/cmd/upgradeapply.go +++ b/cli/internal/cmd/upgradeapply.go @@ -36,13 +36,13 @@ func newUpgradeApplyCmd() *cobra.Command { cmd.Flags().BoolP("yes", "y", false, "run upgrades without further confirmation\n"+ "WARNING: might delete your resources in case you are using cert-manager in your cluster. Please read the docs.\n"+ "WARNING: might unintentionally overwrite measurements in the running cluster.") - cmd.Flags().Duration("timeout", 5*time.Minute, "change helm upgrade timeout\n"+ + cmd.Flags().Duration("helm-timeout", 10*time.Minute, "change helm upgrade timeout\n"+ "Might be useful for slow connections or big clusters.") cmd.Flags().Bool("conformance", false, "enable conformance mode") cmd.Flags().Bool("skip-helm-wait", false, "install helm charts without waiting for deployments to be ready") cmd.Flags().StringSlice("skip-phases", nil, "comma-separated list of upgrade phases to skip\n"+ "one or multiple of { infrastructure | helm | image | k8s }") - must(cmd.Flags().MarkHidden("timeout")) + must(cmd.Flags().MarkHidden("helm-timeout")) return cmd }