From a033cdf5157fab0b4fd029cc4030df024ca7afdb Mon Sep 17 00:00:00 2001 From: Mathieu Champlon Date: Thu, 1 Jul 2021 08:59:10 +0200 Subject: [PATCH] Deprecate Kubernetes context support Signed-off-by: Mathieu Champlon --- 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 9e6fe0295b..776d29fa10 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 6013071402..c7cc94ff3e 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 3c67fdd207..cfd4d76bc8 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 97d36e7751..5d18481ad0 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