Write a guide for developing modules
The guide can be based on examples/podinfo and should include:
- an introduction to CUE lang
- an introduction to CUE modules
- explain what are the conventions to make a CUE module compatible with Timoni
- how to create a Timoni module from scratch with
timoni mod init - how to import Kubernetes types and generate CUE definitions
- how to create templates using the generated Kubernetes CUE definitions
- explain the role of
templates/config.cueand how it relates tovalues.cue - explain the role of
timoni.cueand how it relates totimoni build - explain how the user-defined
values.cuefiles are merged and why Timoni had to break CUE immutability
how to create a Timoni module from scratch with
timoni mod init
I find that the full-blown podinfo piece this command currently generates is a bit too complex for getting started, ideally, I think it should write out a bare minimum, perhaps just a skeleton. Of course, you need to strike a balance here, but perhaps we could try to use a deployment with a few basic parameters, e.g. namespace, labels, image & replicas?
Hey @stefanprodan this looks great, how have I only just discovered this project! It aligns really closely with some discussions I've been having about Helm improvements such as using CUE to create the values YAML & schema, Cosign signing, and separating chart developer and chart consumer responsibilities.
I have a couple of questions, apologies if I've missed them as a latecomer.
- Is there an example of a module for a complex system (multi component) such as Thanos?
- Are there plans to add module developer tooling for image dependencies?
- Standard image updates (e.g.
v1.0.01->v1.0.1) - Rolling images such as Chainguard where the digest should be updated if it's changed
- Standard image updates (e.g.
- Have you considered supporting generating Helm charts from Timoni?
I used the documentation to do this and found it pretty complete so I would say this can be closed.
Only thing was this:
explain how the user-defined values.cue files are merged and why Timoni had to break CUE immutability
It might be in there in some way, but it didn't come across to me when going through things.