ytt icon indicating copy to clipboard operation
ytt copied to clipboard

Can an overlay change a function definition?

Open scastria opened this issue 1 year ago • 2 comments

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?

scastria avatar Jun 24 '24 22:06 scastria

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.

prembhaskal avatar Jun 29 '24 05:06 prembhaskal

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

renuy avatar Jul 05 '24 06:07 renuy