mirror of https://github.com/docker/cli.git
warn user kubernetes is deprecated and options won't be stored in context
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
7b9580df51
commit
1d48749c1c
|
@ -3,6 +3,7 @@ package context
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
"text/tabwriter"
|
"text/tabwriter"
|
||||||
|
|
||||||
"github.com/docker/cli/cli"
|
"github.com/docker/cli/cli"
|
||||||
|
@ -107,6 +108,9 @@ func createNewContext(o *CreateOptions, stackOrchestrator command.Orchestrator,
|
||||||
if dockerTLS != nil {
|
if dockerTLS != nil {
|
||||||
contextTLSData.Endpoints[docker.DockerEndpoint] = *dockerTLS
|
contextTLSData.Endpoints[docker.DockerEndpoint] = *dockerTLS
|
||||||
}
|
}
|
||||||
|
if len(o.Kubernetes) != 0 {
|
||||||
|
logrus.Warn("kubernetes orchestrator is deprecated")
|
||||||
|
}
|
||||||
if err := validateEndpointsAndOrchestrator(contextMetadata); err != nil {
|
if err := validateEndpointsAndOrchestrator(contextMetadata); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package context
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
"text/tabwriter"
|
"text/tabwriter"
|
||||||
|
|
||||||
"github.com/docker/cli/cli"
|
"github.com/docker/cli/cli"
|
||||||
|
@ -15,11 +16,14 @@ import (
|
||||||
|
|
||||||
// UpdateOptions are the options used to update a context
|
// UpdateOptions are the options used to update a context
|
||||||
type UpdateOptions struct {
|
type UpdateOptions struct {
|
||||||
Name string
|
Name string
|
||||||
Description string
|
Description string
|
||||||
|
Docker map[string]string
|
||||||
|
|
||||||
|
// Deprecated
|
||||||
DefaultStackOrchestrator string
|
DefaultStackOrchestrator string
|
||||||
Docker map[string]string
|
// Deprecated
|
||||||
Kubernetes map[string]string
|
Kubernetes map[string]string
|
||||||
}
|
}
|
||||||
|
|
||||||
func longUpdateDescription() string {
|
func longUpdateDescription() string {
|
||||||
|
@ -98,6 +102,9 @@ func RunUpdate(cli command.Cli, o *UpdateOptions) error {
|
||||||
c.Endpoints[docker.DockerEndpoint] = dockerEP
|
c.Endpoints[docker.DockerEndpoint] = dockerEP
|
||||||
tlsDataToReset[docker.DockerEndpoint] = dockerTLS
|
tlsDataToReset[docker.DockerEndpoint] = dockerTLS
|
||||||
}
|
}
|
||||||
|
if len(o.Kubernetes) != 0 {
|
||||||
|
logrus.Warn("kubernetes orchestrator is deprecated")
|
||||||
|
}
|
||||||
if err := validateEndpointsAndOrchestrator(c); err != nil {
|
if err := validateEndpointsAndOrchestrator(c); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue