fix: upgrade-k8s to flag should not be required since there is a default

Having a default and still requiring it confuses the user.

Signed-off-by: Steffen Windoffer <steffen@wind0r.de>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
This commit is contained in:
Steffen Windoffer 2023-03-09 13:27:37 +01:00 committed by Andrey Smirnov
parent 230cfaf803
commit c8f8579f2d
No known key found for this signature in database
GPG Key ID: 7B26396447AB6DFD

View File

@ -12,7 +12,6 @@ import (
"github.com/spf13/cobra"
"github.com/siderolabs/talos/cmd/talosctl/pkg/talos/helpers"
"github.com/siderolabs/talos/pkg/cli"
"github.com/siderolabs/talos/pkg/cluster"
k8s "github.com/siderolabs/talos/pkg/cluster/kubernetes"
"github.com/siderolabs/talos/pkg/machinery/client"
@ -43,7 +42,6 @@ func init() {
upgradeK8sCmd.Flags().StringVar(&upgradeOptions.ControlPlaneEndpoint, "endpoint", "", "the cluster control plane endpoint")
upgradeK8sCmd.Flags().BoolVar(&upgradeOptions.DryRun, "dry-run", false, "skip the actual upgrade and show the upgrade plan instead")
upgradeK8sCmd.Flags().BoolVar(&upgradeOptions.UpgradeKubelet, "upgrade-kubelet", true, "upgrade kubelet service")
cli.Should(upgradeK8sCmd.MarkFlagRequired("to"))
addCommand(upgradeK8sCmd)
}