Commit f1b6373f authored by Matt Butcher's avatar Matt Butcher

Merge pull request #772 from Ladicle/fix-init-command

fix(tiller): fix install function
parents 3d039822 97a9586a
......@@ -40,17 +40,18 @@ func NewInstaller() *Installer {
func (i *Installer) Install(verbose, createNS bool) error {
var b bytes.Buffer
t := template.New("manifest").Funcs(sprig.TxtFuncMap())
// Add namespace
if createNS {
if err := template.Must(t.Parse(NamespaceYAML)).Execute(&b, i); err != nil {
nstpl := template.New("namespace").Funcs(sprig.TxtFuncMap())
if err := template.Must(nstpl.Parse(NamespaceYAML)).Execute(&b, i); err != nil {
return err
}
}
// Add main install YAML
if err := template.Must(t.Parse(InstallYAML)).Execute(&b, i); err != nil {
istpl := template.New("install").Funcs(sprig.TxtFuncMap())
if err := template.Must(istpl.Parse(InstallYAML)).Execute(&b, i); err != nil {
return err
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment