From b639ea8b89b162c3abe99d3ac90b258c48e2039c Mon Sep 17 00:00:00 2001 From: Mathieu Champlon Date: Mon, 28 Jun 2021 14:57:15 +0200 Subject: [PATCH 1/3] Deprecate Kubernetes stack support Signed-off-by: Mathieu Champlon (cherry picked from commit 7190255a68018af93ea29f2213c0b3874f554943) Signed-off-by: Sebastiaan van Stijn --- docs/deprecated.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/deprecated.md b/docs/deprecated.md index 4cff064feb5c..97d36e77517f 100644 --- a/docs/deprecated.md +++ b/docs/deprecated.md @@ -50,6 +50,7 @@ The table below provides an overview of the current status of deprecated feature Status | Feature | Deprecated | Remove -----------|------------------------------------------------------------------------------------------------------------------------------------|------------|------------ +Deprecated | [Kubernetes stack support](#kubernetes-stack-support) | v20.10 | - Deprecated | [Pulling images from non-compliant image registries](#pulling-images-from-non-compliant-image-registries) | v20.10 | - Deprecated | [Linux containers on Windows (LCOW)](#linux-containers-on-windows-lcow-experimental) | v20.10 | - Deprecated | [BLKIO weight options with cgroups v1](#blkio-weight-options–with-cgroups-v1) | v20.10 | - @@ -97,6 +98,13 @@ Removed | [`--api-enable-cors` flag on `dockerd`](#--api-enable-cors-flag-on- Removed | [`--run` flag on `docker commit`](#--run-flag-on-docker-commit) | v0.10 | v1.13 Removed | [Three arguments form in `docker import`](#three-arguments-form-in-docker-import) | v0.6.7 | v1.12 +### Kubernetes stack support + +**Deprecated in Release: v20.10** + +Following the deprecation of [Compose on Kubernetes](https://github.com/docker/compose-on-kubernetes), support for +Kubernetes in the `stack` command in the docker CLI is now marked as deprecated as well. + ### Pulling images from non-compliant image registries **Deprecated in Release: v20.10** From 0793f9639440d8980226485189ce0eb43e0af28b Mon Sep 17 00:00:00 2001 From: Mathieu Champlon Date: Tue, 29 Jun 2021 14:48:14 +0200 Subject: [PATCH 2/3] Deprecate Kubernetes stack support Signed-off-by: Mathieu Champlon (cherry picked from commit c05f0f5957f34ca5a17709849fb5979e1f24c64d) Signed-off-by: Sebastiaan van Stijn --- cli/command/stack/cmd.go | 2 ++ cli/command/stack/kubernetes/cli.go | 1 + cli/command/stack/list.go | 2 ++ cli/command/system/version.go | 1 + docs/yaml/yaml.go | 3 +++ 5 files changed, 9 insertions(+) diff --git a/cli/command/stack/cmd.go b/cli/command/stack/cmd.go index f4ded7716934..8248ad240d6e 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 a531846809cc..9b6d50473b37 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 5175ea371c8f..412cc2e5ee86 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 c086822c88ab..418ce651c0ca 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 82c90973c00a..9ffd8bba3a9e 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] } From 1d37fb302789c6ce4ba120bc4ad577c92674467f Mon Sep 17 00:00:00 2001 From: Mathieu Champlon Date: Thu, 1 Jul 2021 08:59:10 +0200 Subject: [PATCH 3/3] Deprecate Kubernetes context support Signed-off-by: Mathieu Champlon (cherry picked from commit a033cdf5157fab0b4fd029cc4030df024ca7afdb) Signed-off-by: Sebastiaan van Stijn --- cli/command/context/create.go | 3 +++ cli/command/context/export.go | 2 ++ cli/command/context/update.go | 3 +++ docs/deprecated.md | 6 +++--- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cli/command/context/create.go b/cli/command/context/create.go index 9e6fe0295b4d..776d29fa10d7 100644 --- a/cli/command/context/create.go +++ b/cli/command/context/create.go @@ -62,8 +62,11 @@ func newCreateCommand(dockerCli command.Cli) *cobra.Command { &opts.DefaultStackOrchestrator, "default-stack-orchestrator", "", "Default orchestrator for stack operations to use with this context (swarm|kubernetes|all)") + flags.SetAnnotation("default-stack-orchestrator", "deprecated", nil) flags.StringToStringVar(&opts.Docker, "docker", nil, "set the docker endpoint") flags.StringToStringVar(&opts.Kubernetes, "kubernetes", nil, "set the kubernetes endpoint") + flags.SetAnnotation("kubernetes", "kubernetes", nil) + flags.SetAnnotation("kubernetes", "deprecated", nil) flags.StringVar(&opts.From, "from", "", "create context from a named context") return cmd } diff --git a/cli/command/context/export.go b/cli/command/context/export.go index 601307140238..c7cc94ff3e0f 100644 --- a/cli/command/context/export.go +++ b/cli/command/context/export.go @@ -46,6 +46,8 @@ func newExportCommand(dockerCli command.Cli) *cobra.Command { flags := cmd.Flags() flags.BoolVar(&opts.Kubeconfig, "kubeconfig", false, "Export as a kubeconfig file") + flags.SetAnnotation("kubeconfig", "kubernetes", nil) + flags.SetAnnotation("kubeconfig", "deprecated", nil) return cmd } diff --git a/cli/command/context/update.go b/cli/command/context/update.go index 3c67fdd207fb..cfd4d76bc880 100644 --- a/cli/command/context/update.go +++ b/cli/command/context/update.go @@ -61,8 +61,11 @@ func newUpdateCommand(dockerCli command.Cli) *cobra.Command { &opts.DefaultStackOrchestrator, "default-stack-orchestrator", "", "Default orchestrator for stack operations to use with this context (swarm|kubernetes|all)") + flags.SetAnnotation("default-stack-orchestrator", "deprecated", nil) flags.StringToStringVar(&opts.Docker, "docker", nil, "set the docker endpoint") flags.StringToStringVar(&opts.Kubernetes, "kubernetes", nil, "set the kubernetes endpoint") + flags.SetAnnotation("kubernetes", "kubernetes", nil) + flags.SetAnnotation("kubernetes", "deprecated", nil) return cmd } diff --git a/docs/deprecated.md b/docs/deprecated.md index 97d36e77517f..5d18481ad0f5 100644 --- a/docs/deprecated.md +++ b/docs/deprecated.md @@ -50,7 +50,7 @@ The table below provides an overview of the current status of deprecated feature Status | Feature | Deprecated | Remove -----------|------------------------------------------------------------------------------------------------------------------------------------|------------|------------ -Deprecated | [Kubernetes stack support](#kubernetes-stack-support) | v20.10 | - +Deprecated | [Kubernetes stack and context support](#kubernetes-stack-and-context-support) | v20.10 | - Deprecated | [Pulling images from non-compliant image registries](#pulling-images-from-non-compliant-image-registries) | v20.10 | - Deprecated | [Linux containers on Windows (LCOW)](#linux-containers-on-windows-lcow-experimental) | v20.10 | - Deprecated | [BLKIO weight options with cgroups v1](#blkio-weight-options–with-cgroups-v1) | v20.10 | - @@ -98,12 +98,12 @@ Removed | [`--api-enable-cors` flag on `dockerd`](#--api-enable-cors-flag-on- Removed | [`--run` flag on `docker commit`](#--run-flag-on-docker-commit) | v0.10 | v1.13 Removed | [Three arguments form in `docker import`](#three-arguments-form-in-docker-import) | v0.6.7 | v1.12 -### Kubernetes stack support +### Kubernetes stack and context support **Deprecated in Release: v20.10** Following the deprecation of [Compose on Kubernetes](https://github.com/docker/compose-on-kubernetes), support for -Kubernetes in the `stack` command in the docker CLI is now marked as deprecated as well. +Kubernetes in the `stack` and `context` commands in the docker CLI is now marked as deprecated as well. ### Pulling images from non-compliant image registries