diff --git a/components/cli/cli/command/orchestrator.go b/components/cli/cli/command/orchestrator.go index 4efe623c29..d27bd6c1fa 100644 --- a/components/cli/cli/command/orchestrator.go +++ b/components/cli/cli/command/orchestrator.go @@ -21,9 +21,9 @@ const ( func normalize(flag string) Orchestrator { switch flag { - case "kubernetes", "k8s": + case "kubernetes": return OrchestratorKubernetes - case "swarm", "swarmkit": + case "swarm": return OrchestratorSwarm default: return orchestratorUnset diff --git a/components/cli/docs/yaml/yaml.go b/components/cli/docs/yaml/yaml.go index d909e45336..8e42e25d8f 100644 --- a/components/cli/docs/yaml/yaml.go +++ b/components/cli/docs/yaml/yaml.go @@ -123,7 +123,7 @@ func GenYamlCustom(cmd *cobra.Command, w io.Writer) error { cliDoc.Kubernetes = true } if _, ok := curr.Annotations["swarm"]; ok && !cliDoc.Swarm { - cliDoc.Kubernetes = true + cliDoc.Swarm = true } } @@ -208,7 +208,7 @@ func genFlagResult(flags *pflag.FlagSet) []cmdOption { opt.Kubernetes = true } if _, ok := flag.Annotations["swarm"]; ok { - opt.Kubernetes = true + opt.Swarm = true } result = append(result, opt)