feat: send hooks to post-renderers

Signed-off-by: Zadkiel Aharonian <hello@zadkiel.fr>
pull/11740/head
Zadkiel Aharonian 3 years ago committed by GitHub
parent 76157c6d06
commit 8a89263e3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -216,9 +216,20 @@ func (cfg *Configuration) renderResources(ch *chart.Chart, values chartutil.Valu
}
if pr != nil {
b, err = pr.Run(b)
b, err = pr.Run(bpr)
if err != nil {
return hs, b, notes, errors.Wrap(err, "error while running post render on files")
return hs, b, notes, errors.Wrap(err, "error while running post render on manifest files")
}
// NOTE: Send Hook manifests to the post-renderer
for _, h := range hs {
hb := bytes.NewBuffer(nil)
fmt.Fprintf(hb, "---\n# Source: %s\n%s\n", h.Path, h.Manifest)
bpr, err = pr.Run(hb)
if err != nil {
return hs, b, notes, errors.Wrap(err, "error while running post render on hook files")
}
h.Manifest = hb.String()
}
}

Loading…
Cancel
Save