Skip to content

Commit 6ea2767

Browse files
committed
config: mark stackOrchestrator option as deprecated
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent b7d0f5c commit 6ea2767

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

cli/command/defaultcontextstore_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ func TestDefaultContextInitializer(t *testing.T) {
6060
cli, err := NewDockerCli()
6161
assert.NilError(t, err)
6262
defer env.Patch(t, "DOCKER_HOST", "ssh://someswarmserver")()
63-
cli.configFile = &configfile.ConfigFile{
64-
StackOrchestrator: "swarm",
65-
}
63+
cli.configFile = &configfile.ConfigFile{}
6664
ctx, err := ResolveDefaultContext(&cliflags.CommonOptions{
6765
TLS: true,
6866
TLSOptions: &tlsconfig.Options{

cli/config/configfile/file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type ConfigFile struct {
4545
PruneFilters []string `json:"pruneFilters,omitempty"`
4646
Proxies map[string]ProxyConfig `json:"proxies,omitempty"`
4747
Experimental string `json:"experimental,omitempty"`
48-
StackOrchestrator string `json:"stackOrchestrator,omitempty"`
48+
StackOrchestrator string `json:"stackOrchestrator,omitempty"` // Deprecated: swarm is now the default orchestrator, and this option is ignored.
4949
CurrentContext string `json:"currentContext,omitempty"`
5050
CLIPluginsExtraDirs []string `json:"cliPluginsExtraDirs,omitempty"`
5151
Plugins map[string]map[string]string `json:"plugins,omitempty"`

docs/deprecated.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ The following command-line flags are removed from the `docker stack` subcommands
220220
- `--orchestrator` - swarm is now the only (and default) orchestrator for stacks.
221221

222222
The `DOCKER_STACK_ORCHESTRATOR`, `DOCKER_ORCHESTRATOR`, and `KUBECONFIG` environment
223-
variables are no longer used, and ignored.
223+
variables, as well as the `stackOrchestrator` option in the `~/.docker/config.json`
224+
cli configuration file are no longer used, and ignored.
224225

225226
### Pulling images from non-compliant image registries
226227

docs/reference/commandline/cli.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ various fields:
273273
"awesomereg.example.org": "hip-star",
274274
"unicorn.example.com": "vcbait"
275275
},
276-
"stackOrchestrator": "kubernetes",
277276
"plugins": {
278277
"plugin1": {
279278
"option": "value"

0 commit comments

Comments
 (0)