Support docker bundles format

This commit is contained in:
ngtuna
2016-07-20 02:01:40 +07:00
parent 7a41edb65e
commit a9184491b7
4 changed files with 185 additions and 200 deletions
+15 -30
View File
@@ -24,9 +24,9 @@ import (
// ConvertCommand defines the kompose convert subcommand.
func ConvertCommand() cli.Command {
return cli.Command{
Name: "convert",
Usage: "Convert docker-compose.yml to Kubernetes objects",
Action: func (c *cli.Context) {
Name: "convert",
Usage: "Convert docker-compose.yml to Kubernetes objects",
Action: func(c *cli.Context) {
app.Convert(c)
},
Flags: []cli.Flag{
@@ -82,9 +82,9 @@ func ConvertCommand() cli.Command {
// UpCommand defines the kompose up subcommand.
func UpCommand() cli.Command {
return cli.Command{
Name: "up",
Usage: "Submit rc, svc objects to kubernetes API endpoint",
Action: func (c *cli.Context) {
Name: "up",
Usage: "Submit rc, svc objects to kubernetes API endpoint",
Action: func(c *cli.Context) {
app.Up(c)
},
}
@@ -93,9 +93,9 @@ func UpCommand() cli.Command {
// PsCommand defines the kompose ps subcommand.
func PsCommand() cli.Command {
return cli.Command{
Name: "ps",
Usage: "Get active data in the kubernetes cluster",
Action: func (c *cli.Context) {
Name: "ps",
Usage: "Get active data in the kubernetes cluster",
Action: func(c *cli.Context) {
app.Ps(c)
},
Flags: []cli.Flag{
@@ -114,9 +114,9 @@ func PsCommand() cli.Command {
// DeleteCommand defines the kompose delete subcommand.
func DeleteCommand() cli.Command {
return cli.Command{
Name: "delete",
Usage: "Remove instantiated services/rc from kubernetes",
Action: func (c *cli.Context) {
Name: "delete",
Usage: "Remove instantiated services/rc from kubernetes",
Action: func(c *cli.Context) {
app.Delete(c)
},
Flags: []cli.Flag{
@@ -139,9 +139,9 @@ func DeleteCommand() cli.Command {
// ScaleCommand defines the kompose up subcommand.
func ScaleCommand() cli.Command {
return cli.Command{
Name: "scale",
Usage: "Globally scale instantiated replication controllers",
Action: func (c *cli.Context) {
Name: "scale",
Usage: "Globally scale instantiated replication controllers",
Action: func(c *cli.Context) {
app.Scale(c)
},
Flags: []cli.Flag{
@@ -171,18 +171,3 @@ func CommonFlags() []cli.Flag {
},
}
}
//
//// Populate updates the specified project context based on command line arguments and subcommands.
//func Populate(context *project.Context, c *cli.Context) {
// context.ComposeFiles = append(context.ComposeFiles, c.GlobalString("file"))
//
// //if c.Command.Name == "logs" {
// // context.Log = true
// //} else if c.Command.Name == "up" {
// // context.Log = !c.Bool("d")
// // context.NoRecreate = c.Bool("no-recreate")
// // context.ForceRecreate = c.Bool("force-recreate")
// //} else if c.Command.Name == "scale" {
// // context.Timeout = uint(c.Int("timeout"))
// //}
//}