|
|
@ -25,6 +25,7 @@ import (
|
|
|
|
"os"
|
|
|
|
"os"
|
|
|
|
"path"
|
|
|
|
"path"
|
|
|
|
"path/filepath"
|
|
|
|
"path/filepath"
|
|
|
|
|
|
|
|
"regexp"
|
|
|
|
"sort"
|
|
|
|
"sort"
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
"text/template"
|
|
|
|
"text/template"
|
|
|
@ -63,6 +64,8 @@ const notesFileSuffix = "NOTES.txt"
|
|
|
|
|
|
|
|
|
|
|
|
const defaultDirectoryPermission = 0755
|
|
|
|
const defaultDirectoryPermission = 0755
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var whitespaceRegex = regexp.MustCompile(`^\s*$`)
|
|
|
|
|
|
|
|
|
|
|
|
// Install performs an installation operation.
|
|
|
|
// Install performs an installation operation.
|
|
|
|
type Install struct {
|
|
|
|
type Install struct {
|
|
|
|
cfg *Configuration
|
|
|
|
cfg *Configuration
|
|
|
@ -369,6 +372,10 @@ func (c *Configuration) renderResources(ch *chart.Chart, values chartutil.Values
|
|
|
|
if outputDir == "" {
|
|
|
|
if outputDir == "" {
|
|
|
|
fmt.Fprintf(b, "---\n# Source: %s\n%s\n", m.Name, m.Content)
|
|
|
|
fmt.Fprintf(b, "---\n# Source: %s\n%s\n", m.Name, m.Content)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// blank template after execution
|
|
|
|
|
|
|
|
if whitespaceRegex.MatchString(m.Content) {
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
}
|
|
|
|
err = writeToFile(outputDir, m.Name, m.Content)
|
|
|
|
err = writeToFile(outputDir, m.Name, m.Content)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return hs, b, "", err
|
|
|
|
return hs, b, "", err
|
|
|
|