cli: fix helm-timeout flags for deprecated commands (#2676)

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2023-12-04 10:14:16 +01:00 committed by GitHub
parent 8bd17b995e
commit 0e91650631
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ func NewCreateCmd() *cobra.Command {
cmd.Flags().Bool("conformance", false, "") cmd.Flags().Bool("conformance", false, "")
cmd.Flags().Bool("skip-helm-wait", false, "") cmd.Flags().Bool("skip-helm-wait", false, "")
cmd.Flags().Bool("merge-kubeconfig", 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. // Skip all phases but the infrastructure phase.
cmd.Flags().StringSlice("skip-phases", allPhases(skipInfrastructurePhase), "") cmd.Flags().StringSlice("skip-phases", allPhases(skipInfrastructurePhase), "")
return runApply(cmd, args) return runApply(cmd, args)

View File

@ -50,7 +50,7 @@ func NewInitCmd() *cobra.Command {
// We always want to skip the infrastructure phase here, to be aligned with the // We always want to skip the infrastructure phase here, to be aligned with the
// functionality of the old init command. // functionality of the old init command.
cmd.Flags().StringSlice("skip-phases", []string{string(skipInfrastructurePhase)}, "") 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) return runApply(cmd, args)
}, },
Deprecated: "use 'constellation apply' instead.", Deprecated: "use 'constellation apply' instead.",

View File

@ -36,13 +36,13 @@ func newUpgradeApplyCmd() *cobra.Command {
cmd.Flags().BoolP("yes", "y", false, "run upgrades without further confirmation\n"+ 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 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.") "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.") "Might be useful for slow connections or big clusters.")
cmd.Flags().Bool("conformance", false, "enable conformance mode") 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().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"+ cmd.Flags().StringSlice("skip-phases", nil, "comma-separated list of upgrade phases to skip\n"+
"one or multiple of { infrastructure | helm | image | k8s }") "one or multiple of { infrastructure | helm | image | k8s }")
must(cmd.Flags().MarkHidden("timeout")) must(cmd.Flags().MarkHidden("helm-timeout"))
return cmd return cmd
} }