kubeadm: removed the deprecated flag '--experimental-output', please use the flag '--output' instead that serves the same purpose. Affected commands are - "kubeadm config images list", "kubeadm token list", "kubeadm upgade plan", "kubeadm certs check-expiration".

This commit is contained in:
carlory 2024-08-26 16:48:23 +08:00
parent 385fd21d92
commit 84f6301204

View File

@ -105,8 +105,6 @@ func (pf *PrintFlags) AddFlags(cmd *cobra.Command) {
pf.JSONYamlPrintFlags.AddFlags(cmd) pf.JSONYamlPrintFlags.AddFlags(cmd)
pf.KubeTemplatePrintFlags.AddFlags(cmd) pf.KubeTemplatePrintFlags.AddFlags(cmd)
cmd.Flags().StringVarP(pf.OutputFormat, "output", "o", *pf.OutputFormat, fmt.Sprintf("Output format. One of: %s.", strings.Join(pf.AllowedFormats(), "|"))) cmd.Flags().StringVarP(pf.OutputFormat, "output", "o", *pf.OutputFormat, fmt.Sprintf("Output format. One of: %s.", strings.Join(pf.AllowedFormats(), "|")))
cmd.Flags().StringVarP(pf.OutputFormat, "experimental-output", "", *pf.OutputFormat, fmt.Sprintf("Output format. One of: %s.", strings.Join(pf.AllowedFormats(), "|")))
_ = cmd.Flags().MarkDeprecated("experimental-output", "please use --output instead.")
} }
// WithDefaultOutput sets a default output format if one is not provided through a flag value // WithDefaultOutput sets a default output format if one is not provided through a flag value