config: mark stackOrchestrator option as deprecated

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-02-24 13:35:03 +01:00
parent b7d0f5c667
commit 6ea2767289
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
4 changed files with 4 additions and 6 deletions

View File

@ -60,9 +60,7 @@ func TestDefaultContextInitializer(t *testing.T) {
cli, err := NewDockerCli() cli, err := NewDockerCli()
assert.NilError(t, err) assert.NilError(t, err)
defer env.Patch(t, "DOCKER_HOST", "ssh://someswarmserver")() defer env.Patch(t, "DOCKER_HOST", "ssh://someswarmserver")()
cli.configFile = &configfile.ConfigFile{ cli.configFile = &configfile.ConfigFile{}
StackOrchestrator: "swarm",
}
ctx, err := ResolveDefaultContext(&cliflags.CommonOptions{ ctx, err := ResolveDefaultContext(&cliflags.CommonOptions{
TLS: true, TLS: true,
TLSOptions: &tlsconfig.Options{ TLSOptions: &tlsconfig.Options{

View File

@ -45,7 +45,7 @@ type ConfigFile struct {
PruneFilters []string `json:"pruneFilters,omitempty"` PruneFilters []string `json:"pruneFilters,omitempty"`
Proxies map[string]ProxyConfig `json:"proxies,omitempty"` Proxies map[string]ProxyConfig `json:"proxies,omitempty"`
Experimental string `json:"experimental,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"` CurrentContext string `json:"currentContext,omitempty"`
CLIPluginsExtraDirs []string `json:"cliPluginsExtraDirs,omitempty"` CLIPluginsExtraDirs []string `json:"cliPluginsExtraDirs,omitempty"`
Plugins map[string]map[string]string `json:"plugins,omitempty"` Plugins map[string]map[string]string `json:"plugins,omitempty"`

View File

@ -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. - `--orchestrator` - swarm is now the only (and default) orchestrator for stacks.
The `DOCKER_STACK_ORCHESTRATOR`, `DOCKER_ORCHESTRATOR`, and `KUBECONFIG` environment 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 ### Pulling images from non-compliant image registries

View File

@ -273,7 +273,6 @@ various fields:
"awesomereg.example.org": "hip-star", "awesomereg.example.org": "hip-star",
"unicorn.example.com": "vcbait" "unicorn.example.com": "vcbait"
}, },
"stackOrchestrator": "kubernetes",
"plugins": { "plugins": {
"plugin1": { "plugin1": {
"option": "value" "option": "value"