stefanprodan / timoni

Timoni is a package manager for Kubernetes, powered by CUE and inspired by Helm.
https://timoni.sh
Apache License 2.0
1.45k stars 66 forks source link

[Question] Cue Templates in Bundles #330

Closed andrewthauer closed 5 months ago

andrewthauer commented 5 months ago

A common pattern we use with helm is umbrella charts. In most cases this umbrella chart just depends on a bunch of other charts and we set values in yaml. This aligns nicely with bundles in timoni.

Sometimes though, we add one-off or custom templates to the umbrella chart itself.

Is there any analogue or pattern to do this with timoni? Or is the intention to publish a module artifact for these one-offs and use that instance in the module?

stefanprodan commented 5 months ago

Timoni goal is to enable type-safe templating, adding some random struct to a bundle would go against it, as bundles are pure config files, not CUE modules with Kubernetes schemas and CRD schemas. Kubernetes templating is only supported in Timoni modules, so you would need to create a module for the one-offs.

andrewthauer commented 5 months ago

Thanks for confirming my suspicions. I'm evaluating Timoni for usage with ArgoCD, which only uses the rendering of manifests portion. It seems to work decently well and I suppose we could render a local module with timoni build as well to simulate a helm umbrella chart with it's own templates. However, would be require a lot more boilerplate and setup.