carvel-dev / ytt

YAML templating tool that works on YAML structure instead of text
https://carvel.dev/ytt
Apache License 2.0
1.62k stars 136 forks source link

Can an overlay change a function definition? #922

Open scastria opened 1 week ago

scastria commented 1 week ago

Suppose I had a yml file that declared a function that is called throughout that yml file. Can I add an overlay that redefines that function to have different content?

prembhaskal commented 6 days ago

I think it cannot. If you see here https://carvel.dev/ytt/docs/v0.49.x/how-it-works/ , overlay works on top of evaluated templates. Evaluated templates cannot have function definition because ytt does not emit comments, and all functions are defined as comments.

renuy commented 14 hours ago

@scastria for ytt clarifications, you can also reach out on #carvel in Kubernetes Slack