Skip to content

Commit 4404f87

Browse files
committed
remove helm template
1 parent 9517886 commit 4404f87

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

cmd/kots/cli/template.go

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"fmt"
55
"io"
66
"os"
7-
"os/exec"
87
"path/filepath"
98
"strings"
109

@@ -313,47 +312,5 @@ func pullAndRender(appSlug string, licensePath string, configPath string, localP
313312
fmt.Println(m)
314313
}
315314

316-
// also render helm charts with helm template if any
317-
helmChartsDir := filepath.Join(tempDir, "helm")
318-
if _, err := os.Stat(helmChartsDir); err == nil {
319-
logger.Info("Rendering Helm charts with helm template...")
320-
var chartPath string
321-
var valuesPath string
322-
323-
err := filepath.Walk(helmChartsDir, func(path string, info os.FileInfo, err error) error {
324-
if err != nil {
325-
return err
326-
}
327-
328-
if info.IsDir() {
329-
return nil
330-
}
331-
332-
if filepath.Ext(path) == ".tgz" {
333-
chartPath = path
334-
}
335-
336-
if info.Name() == "values.yaml" {
337-
valuesPath = path
338-
}
339-
340-
return nil
341-
})
342-
343-
if err != nil {
344-
return errors.Wrap(err, "failed to walk helm charts directory")
345-
}
346-
347-
if chartPath != "" && valuesPath != "" {
348-
args := []string{"template", "tmp-release", chartPath, "--values", valuesPath}
349-
cmd := exec.Command("helm", args...)
350-
output, err := cmd.CombinedOutput()
351-
if err != nil {
352-
return errors.Wrap(err, "failed to run helm template")
353-
}
354-
fmt.Println(string(output))
355-
}
356-
}
357-
358315
return nil
359316
}

0 commit comments

Comments
 (0)