diff --git a/cli/command/stack/cmd.go b/cli/command/stack/cmd.go index f4ded77169..8248ad240d 100644 --- a/cli/command/stack/cmd.go +++ b/cli/command/stack/cmd.go @@ -69,7 +69,9 @@ func NewStackCommand(dockerCli command.Cli) *cobra.Command { flags := cmd.PersistentFlags() flags.String("kubeconfig", "", "Kubernetes config file") flags.SetAnnotation("kubeconfig", "kubernetes", nil) + flags.SetAnnotation("kubeconfig", "deprecated", nil) flags.String("orchestrator", "", "Orchestrator to use (swarm|kubernetes|all)") + flags.SetAnnotation("orchestrator", "deprecated", nil) return cmd } diff --git a/cli/command/stack/kubernetes/cli.go b/cli/command/stack/kubernetes/cli.go index a531846809..9b6d50473b 100644 --- a/cli/command/stack/kubernetes/cli.go +++ b/cli/command/stack/kubernetes/cli.go @@ -50,6 +50,7 @@ func NewOptions(flags *flag.FlagSet, orchestrator command.Orchestrator) Options func AddNamespaceFlag(flags *flag.FlagSet) { flags.String("namespace", "", "Kubernetes namespace to use") flags.SetAnnotation("namespace", "kubernetes", nil) + flags.SetAnnotation("namespace", "deprecated", nil) } // WrapCli wraps command.Cli with kubernetes specifics diff --git a/cli/command/stack/list.go b/cli/command/stack/list.go index 5175ea371c..412cc2e5ee 100644 --- a/cli/command/stack/list.go +++ b/cli/command/stack/list.go @@ -30,8 +30,10 @@ func newListCommand(dockerCli command.Cli, common *commonOptions) *cobra.Command flags.StringVar(&opts.Format, "format", "", "Pretty-print stacks using a Go template") flags.StringSliceVar(&opts.Namespaces, "namespace", []string{}, "Kubernetes namespaces to use") flags.SetAnnotation("namespace", "kubernetes", nil) + flags.SetAnnotation("namespace", "deprecated", nil) flags.BoolVarP(&opts.AllNamespaces, "all-namespaces", "", false, "List stacks from all Kubernetes namespaces") flags.SetAnnotation("all-namespaces", "kubernetes", nil) + flags.SetAnnotation("all-namespaces", "deprecated", nil) return cmd } diff --git a/cli/command/system/version.go b/cli/command/system/version.go index c086822c88..418ce651c0 100644 --- a/cli/command/system/version.go +++ b/cli/command/system/version.go @@ -114,6 +114,7 @@ func NewVersionCommand(dockerCli command.Cli) *cobra.Command { flags.StringVarP(&opts.format, "format", "f", "", "Format the output using the given Go template") flags.StringVar(&opts.kubeConfig, "kubeconfig", "", "Kubernetes config file") flags.SetAnnotation("kubeconfig", "kubernetes", nil) + flags.SetAnnotation("kubeconfig", "deprecated", nil) return cmd } diff --git a/docs/yaml/yaml.go b/docs/yaml/yaml.go index 82c90973c0..9ffd8bba3a 100644 --- a/docs/yaml/yaml.go +++ b/docs/yaml/yaml.go @@ -199,6 +199,9 @@ func genFlagResult(flags *pflag.FlagSet) []cmdOption { if _, ok := flag.Annotations["experimental"]; ok { opt.Experimental = true } + if _, ok := flag.Annotations["deprecated"]; ok { + opt.Deprecated = true + } if v, ok := flag.Annotations["version"]; ok { opt.MinAPIVersion = v[0] }