You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it is not possible to wrap the cue software and register custom built-in functions and that is totally correct as it would make debugging way more complicated and would potentially allow non-hermetic use. But since _tool.cue files are allowed to break these premises I would like to see a way to register custom built-in functions for use inside a _tool.cue file.
My Usecase
I have a fairly big Kubernetes config that gets generated and validated via CUE. We deploy from a local machine and use gopass as store for our secrets. I already build a small wrapper that lists and fetches the secrets into a CUE _tool environment which is fairly simple and allows to just have non-concrete values inside the config that then get filled automagically. Since some changes inside the config it takes nearly forever to evaluate (way over 2 minutes) and requires tens of gigabytes of memory.
For now I "just" patch a custom built-in into CUE and break the guarantees by directly calling gopass from the custom built-in. This reduced the time from minutes to seconds and is fine for me for now until I either find a better solution or the evaluator has matured more to the point of not taking this much time or us switching to a different way of deploying things.
I already got recommendations of just moving the combination step out to external tools but I exactly use CUE because I can do everything in one tool.
Is that a reasonable thing or did I interpret the use wrong?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently it is not possible to wrap the cue software and register custom built-in functions and that is totally correct as it would make debugging way more complicated and would potentially allow non-hermetic use. But since _tool.cue files are allowed to break these premises I would like to see a way to register custom built-in functions for use inside a _tool.cue file.
My Usecase
I have a fairly big Kubernetes config that gets generated and validated via CUE. We deploy from a local machine and use
gopass
as store for our secrets. I already build a small wrapper that lists and fetches the secrets into a CUE _tool environment which is fairly simple and allows to just have non-concrete values inside the config that then get filled automagically. Since some changes inside the config it takes nearly forever to evaluate (way over 2 minutes) and requires tens of gigabytes of memory.For now I "just" patch a custom built-in into CUE and break the guarantees by directly calling
gopass
from the custom built-in. This reduced the time from minutes to seconds and is fine for me for now until I either find a better solution or the evaluator has matured more to the point of not taking this much time or us switching to a different way of deploying things.I already got recommendations of just moving the combination step out to external tools but I exactly use CUE because I can do everything in one tool.
Is that a reasonable thing or did I interpret the use wrong?
Beta Was this translation helpful? Give feedback.
All reactions