Add --bundle,-dab flag for specifying dab file

This commit is contained in:
Janet Kuo
2016-07-25 16:00:38 -07:00
parent 5ba4f38c65
commit b289594c84
2 changed files with 20 additions and 12 deletions
+10 -8
View File
@@ -17,6 +17,8 @@ limitations under the License.
package command
import (
"fmt"
"github.com/skippbox/kompose/cli/app"
"github.com/urfave/cli"
)
@@ -25,17 +27,22 @@ import (
func ConvertCommand() cli.Command {
return cli.Command{
Name: "convert",
Usage: "Convert docker-compose.yml to Kubernetes objects",
Usage: fmt.Sprintf("Convert %s to Kubernetes objects", app.DefaultComposeFile),
Action: func(c *cli.Context) {
app.Convert(c)
},
Flags: []cli.Flag{
cli.StringFlag{
Name: "file,f",
Usage: "Specify an alternate compose file (default: docker-compose.yml)",
Value: "docker-compose.yml",
Usage: fmt.Sprintf("Specify an alternate compose file (default: %s)", app.DefaultComposeFile),
Value: app.DefaultComposeFile,
EnvVar: "COMPOSE_FILE",
},
cli.StringFlag{
Name: "bundle,dab",
Usage: "Specify a Distributed Application Bundle (DAB) file",
EnvVar: "DAB_FILE",
},
cli.StringFlag{
Name: "out,o",
Usage: "Specify file name in order to save objects into",
@@ -78,11 +85,6 @@ func ConvertCommand() cli.Command {
Name: "stdout",
Usage: "Print Kubernetes objects to stdout",
},
// FIXME: this flag should be used together with --file/-f in order to specify dab file.
cli.BoolFlag{
Name: "from-bundles",
Usage: "Getting input from docker DAB file",
},
},
}
}