forked from LaconicNetwork/kompose
rebase
This commit is contained in:
parent
37d51e7e10
commit
278d1dba8e
@ -766,7 +766,7 @@ func loadImage(service bundlefile.Service) (string, string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load DAB file into KomposeObject
|
// Load DAB file into KomposeObject
|
||||||
func loadBundlesFile(file string, opt convertOptions) KomposeObject {
|
func loadBundlesFile(file string) KomposeObject {
|
||||||
komposeObject := KomposeObject{
|
komposeObject := KomposeObject{
|
||||||
ServiceConfigs: make(map[string]ServiceConfig),
|
ServiceConfigs: make(map[string]ServiceConfig),
|
||||||
}
|
}
|
||||||
@ -816,7 +816,7 @@ func loadBundlesFile(file string, opt convertOptions) KomposeObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load compose file into KomposeObject
|
// Load compose file into KomposeObject
|
||||||
func loadComposeFile(file string, opt convertOptions) KomposeObject {
|
func loadComposeFile(file string) KomposeObject {
|
||||||
komposeObject := KomposeObject{
|
komposeObject := KomposeObject{
|
||||||
ServiceConfigs: make(map[string]ServiceConfig),
|
ServiceConfigs: make(map[string]ServiceConfig),
|
||||||
}
|
}
|
||||||
@ -1153,10 +1153,10 @@ func Convert(c *cli.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(dabFile) > 0 {
|
if len(dabFile) > 0 {
|
||||||
komposeObject = loadBundlesFile(dabFile, opt)
|
komposeObject = loadBundlesFile(dabFile)
|
||||||
file = dabFile
|
file = dabFile
|
||||||
} else {
|
} else {
|
||||||
komposeObject = loadComposeFile(inputFile, opt)
|
komposeObject = loadComposeFile(inputFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert komposeObject to K8S controllers
|
// Convert komposeObject to K8S controllers
|
||||||
@ -1221,9 +1221,9 @@ func Up(c *cli.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(dabFile) > 0 {
|
if len(dabFile) > 0 {
|
||||||
komposeObject = loadBundlesFile(dabFile, opt)
|
komposeObject = loadBundlesFile(dabFile)
|
||||||
} else {
|
} else {
|
||||||
komposeObject = loadComposeFile(inputFile, opt)
|
komposeObject = loadComposeFile(inputFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert komposeObject to K8S controllers
|
// Convert komposeObject to K8S controllers
|
||||||
@ -1248,7 +1248,7 @@ func Up(c *cli.Context) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Fatalf("Failed to create service %s: ", k, err)
|
logrus.Fatalf("Failed to create service %s: ", k, err)
|
||||||
} else {
|
} else {
|
||||||
fmt.Println("Service "+ k +" has been created.")
|
fmt.Println("Service " + k + " has been created.")
|
||||||
}
|
}
|
||||||
logrus.Debugf("%s\n", scCreated)
|
logrus.Debugf("%s\n", scCreated)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,8 +37,8 @@ func main() {
|
|||||||
app.Flags = append(command.CommonFlags())
|
app.Flags = append(command.CommonFlags())
|
||||||
app.Commands = []cli.Command{
|
app.Commands = []cli.Command{
|
||||||
command.ConvertCommand(),
|
command.ConvertCommand(),
|
||||||
|
command.UpCommand(),
|
||||||
// TODO: enable these commands and update docs once we fix them
|
// TODO: enable these commands and update docs once we fix them
|
||||||
//command.UpCommand(),
|
|
||||||
//command.PsCommand(),
|
//command.PsCommand(),
|
||||||
//command.DeleteCommand(),
|
//command.DeleteCommand(),
|
||||||
//command.ScaleCommand(),
|
//command.ScaleCommand(),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user