carapace-bin/completers/kubeadm_completer/cmd/reset_phase_preflight.go
2025-04-25 18:29:51 +02:00

28 lines
1.1 KiB
Go

package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/kubeadm_completer/cmd/action"
"github.com/spf13/cobra"
)
var reset_phase_preflightCmd = &cobra.Command{
Use: "preflight",
Short: "Run reset pre-flight checks",
Aliases: []string{"pre-flight"},
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(reset_phase_preflightCmd).Standalone()
reset_phase_preflightCmd.Flags().Bool("dry-run", false, "Don't apply any changes; just output what would be done.")
reset_phase_preflightCmd.Flags().BoolP("force", "f", false, "Reset the node without prompting for confirmation.")
reset_phase_preflightCmd.Flags().StringSlice("ignore-preflight-errors", []string{}, "A list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks.")
reset_phaseCmd.AddCommand(reset_phase_preflightCmd)
carapace.Gen(reset_phase_preflightCmd).FlagCompletion(carapace.ActionMap{
"ignore-preflight-errors": action.ActionChecks().UniqueList(","),
})
}