-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CUE templating advice #253
Comments
Looking at the output I guess your for c,v in config.configMaps {
"cm-\(c)": #ConfigMap & {
_config: config
_cm_config: #CMConfig & {
annotations: v.annotations
name: c
data: v.data
}
}
} I would also set max length for the data keys in |
Thanks for the suggestions. I'll make the changes while playing with the syntax. So, is the approach itself idiomatically correct? |
It's definitely more complex than Go text templating, it took me a week or two to get used to it. The most tricky part, coming from Helm and Kustomize, was getting used to CUE's immutability as it requires a diffrent way of thinking about cfg management. For example, once you set a field to a concrete value e.g. |
Thanks for your reply. |
Hello!
First of all, thanks for such a great tool. I'm enjoying playing around with Timoni.
I'm trying to learn how to work with CUE, and I want to ask for advice. I want to create an abstract package that can create various configmaps/services/deployments, etc.
In my experiments, I have values like this:
And then in the instance:
And it works as I expected:
But I'm curious: am I using the right approach? There are only a few examples of how to work with Timoni, and they are straightforward when values are passed to the statically defined objects. So I wonder whether I'm doing something wrong or it looks fine. :)
In perspective, I want to migrate all our helm charts to Timoni.
Thanks for any advice.
The text was updated successfully, but these errors were encountered: