diff --git a/cli/app/app.go b/cli/app/app.go index 97744d60..547e45b2 100644 --- a/cli/app/app.go +++ b/cli/app/app.go @@ -1061,9 +1061,11 @@ func Convert(c *cli.Context) { } komposeObject := KomposeObject{} + file := inputFile if len(dabFile) > 0 { komposeObject = loadBundlesFile(dabFile) + file = dabFile } else { komposeObject = loadComposeFile(inputFile, c) } @@ -1079,7 +1081,7 @@ func Convert(c *cli.Context) { createChart: createChart, generateYaml: generateYaml, replicas: replicas, - inputFile: inputFile, + inputFile: file, outFile: outFile, f: f, } diff --git a/cli/app/k8sutils.go b/cli/app/k8sutils.go index 40f6079b..cdb83bb4 100644 --- a/cli/app/k8sutils.go +++ b/cli/app/k8sutils.go @@ -21,7 +21,7 @@ import ( "fmt" "io/ioutil" "os" - "strings" + "path/filepath" "text/template" "github.com/Sirupsen/logrus" @@ -37,7 +37,8 @@ func generateHelm(filename string, svcnames []string, generateYaml, createD, cre Name string } - dirName := strings.Replace(filename, ".yml", "", 1) + extension := filepath.Ext(filename) + dirName := filename[0 : len(filename)-len(extension)] details := ChartDetails{dirName} manifestDir := dirName + string(os.PathSeparator) + "templates" dir, err := os.Open(dirName)