|
|
|
@ -63,18 +63,19 @@ To render just one template in a chart, use '-x':
|
|
|
|
|
`
|
|
|
|
|
|
|
|
|
|
type templateCmd struct {
|
|
|
|
|
namespace string
|
|
|
|
|
valueFiles valueFiles
|
|
|
|
|
chartPath string
|
|
|
|
|
out io.Writer
|
|
|
|
|
values []string
|
|
|
|
|
stringValues []string
|
|
|
|
|
nameTemplate string
|
|
|
|
|
showNotes bool
|
|
|
|
|
releaseName string
|
|
|
|
|
renderFiles []string
|
|
|
|
|
kubeVersion string
|
|
|
|
|
outputDir string
|
|
|
|
|
namespace string
|
|
|
|
|
valueFiles valueFiles
|
|
|
|
|
chartPath string
|
|
|
|
|
out io.Writer
|
|
|
|
|
values []string
|
|
|
|
|
stringValues []string
|
|
|
|
|
nameTemplate string
|
|
|
|
|
showNotes bool
|
|
|
|
|
releaseName string
|
|
|
|
|
releaseIsUpgrade bool
|
|
|
|
|
renderFiles []string
|
|
|
|
|
kubeVersion string
|
|
|
|
|
outputDir string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func newTemplateCmd(out io.Writer) *cobra.Command {
|
|
|
|
@ -93,6 +94,7 @@ func newTemplateCmd(out io.Writer) *cobra.Command {
|
|
|
|
|
f := cmd.Flags()
|
|
|
|
|
f.BoolVar(&t.showNotes, "notes", false, "show the computed NOTES.txt file as well")
|
|
|
|
|
f.StringVarP(&t.releaseName, "name", "n", "RELEASE-NAME", "release name")
|
|
|
|
|
f.BoolVar(&t.releaseIsUpgrade, "is-upgrade", false, "set .Release.IsUpgrade instead of .Release.IsInstall")
|
|
|
|
|
f.StringArrayVarP(&t.renderFiles, "execute", "x", []string{}, "only execute the given templates")
|
|
|
|
|
f.VarP(&t.valueFiles, "values", "f", "specify values in a YAML file (can specify multiple)")
|
|
|
|
|
f.StringVar(&t.namespace, "namespace", "", "namespace to install the release into")
|
|
|
|
@ -159,6 +161,8 @@ func (t *templateCmd) run(cmd *cobra.Command, args []string) error {
|
|
|
|
|
}
|
|
|
|
|
options := chartutil.ReleaseOptions{
|
|
|
|
|
Name: t.releaseName,
|
|
|
|
|
IsInstall: !t.releaseIsUpgrade,
|
|
|
|
|
IsUpgrade: t.releaseIsUpgrade,
|
|
|
|
|
Time: timeconv.Now(),
|
|
|
|
|
Namespace: t.namespace,
|
|
|
|
|
}
|
|
|
|
|