|
|
@ -20,7 +20,6 @@ import (
|
|
|
|
"bytes"
|
|
|
|
"bytes"
|
|
|
|
"errors"
|
|
|
|
"errors"
|
|
|
|
"fmt"
|
|
|
|
"fmt"
|
|
|
|
"path"
|
|
|
|
|
|
|
|
"regexp"
|
|
|
|
"regexp"
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
|
|
|
@ -289,17 +288,18 @@ func (s *ReleaseServer) renderResources(ch *chart.Chart, values chartutil.Values
|
|
|
|
// text file. We have to spin through this map because the file contains path information, so we
|
|
|
|
// text file. We have to spin through this map because the file contains path information, so we
|
|
|
|
// look for terminating NOTES.txt. We also remove it from the files so that we don't have to skip
|
|
|
|
// look for terminating NOTES.txt. We also remove it from the files so that we don't have to skip
|
|
|
|
// it in the sortHooks.
|
|
|
|
// it in the sortHooks.
|
|
|
|
notes := ""
|
|
|
|
var notesBuffer bytes.Buffer
|
|
|
|
for k, v := range files {
|
|
|
|
for k, v := range files {
|
|
|
|
if strings.HasSuffix(k, notesFileSuffix) {
|
|
|
|
if strings.HasSuffix(k, notesFileSuffix) {
|
|
|
|
// Only apply the notes if it belongs to the parent chart
|
|
|
|
// If buffer contains data, add newline before adding more
|
|
|
|
// Note: Do not use filePath.Join since it creates a path with \ which is not expected
|
|
|
|
if notesBuffer.Len() > 0 {
|
|
|
|
if k == path.Join(ch.Metadata.Name, "templates", notesFileSuffix) {
|
|
|
|
notesBuffer.WriteString("\n")
|
|
|
|
notes = v
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
notesBuffer.WriteString(v)
|
|
|
|
delete(files, k)
|
|
|
|
delete(files, k)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
notes := notesBuffer.String()
|
|
|
|
|
|
|
|
|
|
|
|
// Sort hooks, manifests, and partials. Only hooks and manifests are returned,
|
|
|
|
// Sort hooks, manifests, and partials. Only hooks and manifests are returned,
|
|
|
|
// as partials are not used after renderer.Render. Empty manifests are also
|
|
|
|
// as partials are not used after renderer.Render. Empty manifests are also
|
|
|
|