From 6ea2767289d3ae7a65183da1758f4753d5053bd8 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 24 Feb 2022 13:35:03 +0100 Subject: [PATCH] config: mark stackOrchestrator option as deprecated Signed-off-by: Sebastiaan van Stijn --- cli/command/defaultcontextstore_test.go | 4 +--- cli/config/configfile/file.go | 2 +- docs/deprecated.md | 3 ++- docs/reference/commandline/cli.md | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cli/command/defaultcontextstore_test.go b/cli/command/defaultcontextstore_test.go index 1bed50f60889..749d390b1cee 100644 --- a/cli/command/defaultcontextstore_test.go +++ b/cli/command/defaultcontextstore_test.go @@ -60,9 +60,7 @@ func TestDefaultContextInitializer(t *testing.T) { cli, err := NewDockerCli() assert.NilError(t, err) defer env.Patch(t, "DOCKER_HOST", "ssh://someswarmserver")() - cli.configFile = &configfile.ConfigFile{ - StackOrchestrator: "swarm", - } + cli.configFile = &configfile.ConfigFile{} ctx, err := ResolveDefaultContext(&cliflags.CommonOptions{ TLS: true, TLSOptions: &tlsconfig.Options{ diff --git a/cli/config/configfile/file.go b/cli/config/configfile/file.go index 98915bdf6dc5..1b07ccdba25c 100644 --- a/cli/config/configfile/file.go +++ b/cli/config/configfile/file.go @@ -45,7 +45,7 @@ type ConfigFile struct { PruneFilters []string `json:"pruneFilters,omitempty"` Proxies map[string]ProxyConfig `json:"proxies,omitempty"` Experimental string `json:"experimental,omitempty"` - StackOrchestrator string `json:"stackOrchestrator,omitempty"` + StackOrchestrator string `json:"stackOrchestrator,omitempty"` // Deprecated: swarm is now the default orchestrator, and this option is ignored. CurrentContext string `json:"currentContext,omitempty"` CLIPluginsExtraDirs []string `json:"cliPluginsExtraDirs,omitempty"` Plugins map[string]map[string]string `json:"plugins,omitempty"` diff --git a/docs/deprecated.md b/docs/deprecated.md index db8971065589..b7142d874084 100644 --- a/docs/deprecated.md +++ b/docs/deprecated.md @@ -220,7 +220,8 @@ The following command-line flags are removed from the `docker stack` subcommands - `--orchestrator` - swarm is now the only (and default) orchestrator for stacks. The `DOCKER_STACK_ORCHESTRATOR`, `DOCKER_ORCHESTRATOR`, and `KUBECONFIG` environment -variables are no longer used, and ignored. +variables, as well as the `stackOrchestrator` option in the `~/.docker/config.json` +cli configuration file are no longer used, and ignored. ### Pulling images from non-compliant image registries diff --git a/docs/reference/commandline/cli.md b/docs/reference/commandline/cli.md index 1175c7ba834c..cfa64960790f 100644 --- a/docs/reference/commandline/cli.md +++ b/docs/reference/commandline/cli.md @@ -273,7 +273,6 @@ various fields: "awesomereg.example.org": "hip-star", "unicorn.example.com": "vcbait" }, - "stackOrchestrator": "kubernetes", "plugins": { "plugin1": { "option": "value"