Skip to content

Commit

Permalink
Deprecate Kubernetes stack support
Browse files Browse the repository at this point in the history
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
  • Loading branch information
mat007 committed Jul 1, 2021
1 parent 4a6fe51 commit c05f0f5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli/command/stack/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
1 change: 1 addition & 0 deletions cli/command/stack/kubernetes/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions cli/command/stack/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
1 change: 1 addition & 0 deletions cli/command/system/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 3 additions & 0 deletions docs/yaml/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
Expand Down

0 comments on commit c05f0f5

Please sign in to comment.