|
|
|
|
@ -355,7 +355,7 @@ func (cfg *Configuration) renderResources(ctx context.Context, ch *chart.Chart,
|
|
|
|
|
if strings.TrimSpace(content) == "" {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
fmt.Fprintf(b, "---\n# Source: %s\n%s\n", name, content)
|
|
|
|
|
fmt.Fprintf(b, "---\n# Source: %s\n%s\n", name, strings.TrimRight(content, "\n"))
|
|
|
|
|
}
|
|
|
|
|
return hs, b, "", err
|
|
|
|
|
}
|
|
|
|
|
@ -473,7 +473,7 @@ func (cfg *Configuration) renderResources(ctx context.Context, ch *chart.Chart,
|
|
|
|
|
if strings.TrimSpace(content) == "" {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
fmt.Fprintf(b, "---\n# Source: %s\n%s\n", name, content)
|
|
|
|
|
fmt.Fprintf(b, "---\n# Source: %s\n%s\n", name, strings.TrimRight(content, "\n"))
|
|
|
|
|
}
|
|
|
|
|
return hs, b, "", err
|
|
|
|
|
}
|
|
|
|
|
@ -484,7 +484,7 @@ func (cfg *Configuration) renderResources(ctx context.Context, ch *chart.Chart,
|
|
|
|
|
if includeCrds {
|
|
|
|
|
for _, crd := range ch.CRDObjects() {
|
|
|
|
|
if outputDir == "" {
|
|
|
|
|
fmt.Fprintf(b, "---\n# Source: %s\n%s\n", crd.Filename, string(crd.File.Data))
|
|
|
|
|
fmt.Fprintf(b, "---\n# Source: %s\n%s\n", crd.Filename, strings.TrimRight(string(crd.File.Data), "\n"))
|
|
|
|
|
} else {
|
|
|
|
|
err = writeToFile(outputDir, crd.Filename, string(crd.File.Data), fileWritten[crd.Filename])
|
|
|
|
|
if err != nil {
|
|
|
|
|
@ -500,7 +500,7 @@ func (cfg *Configuration) renderResources(ctx context.Context, ch *chart.Chart,
|
|
|
|
|
if hideSecret && m.Head.Kind == "Secret" && m.Head.Version == "v1" {
|
|
|
|
|
fmt.Fprintf(b, "---\n# Source: %s\n# HIDDEN: The Secret output has been suppressed\n", m.Name)
|
|
|
|
|
} else {
|
|
|
|
|
fmt.Fprintf(b, "---\n# Source: %s\n%s\n", m.Name, m.Content)
|
|
|
|
|
fmt.Fprintf(b, "---\n# Source: %s\n%s\n", m.Name, strings.TrimRight(m.Content, "\n"))
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
newDir := outputDir
|
|
|
|
|
|