Replies: 2 comments 5 replies
-
Original reply by @mpvl in cuelang/cue#817 (comment) We have been adding some features like conditional includes (via the We are currently taking a broader look at modules and organization, though. So we would love to hear from users:
|
Beta Was this translation helpful? Give feedback.
-
Using Cue as part of the CI/CD pipeline is working well on our end. We generate Deployments, and ConfigMaps to configure the actual services. However, the fundamental problem I'm having with Cue and Kubernetes is Secrets injection. We use native K8s secrets rather than, say, Hashicorp Vault, and we don't want to expose any secrets in the manifest YAML. Our secrets are encrypted at rest. Our ideal situation would be to generate an exported YAML file which will be used by the containers as configuration, including secrets. We've explored four options: To each point: b) This is much the same as a), but instead of using a wrapper startup script, we use an initcontainer with access to volume-mounted secrets and config files to generate the final config YAML. This is a bit neater than a), but would require every single service to have a Cue initContainer that builds config - it's a hassle! c) To interpret at runtime, we could install Cue as a library on our applications to interpret the raw Cue files, but Cue support isn't great in Python, for instance. d) This reduces our granularity of configuration, which isn't ideal either. Also doesn't play nice with RBAC for individual secrets. At the moment our solution is to use Cue for everything but secrets, so as to not add complexity to our workflow. Since 80% of our configuration are secrets for third-party services anyway we're in a bind. Any suggestions on best practices here? How do we get all the config together at runtime effectively? Is a startup script the only way? One option we have discussed, but not explored in detail is a move to an API service which can generate these config files on the fly and send them over the wire. We would give up on K8s ConfigMaps & Secrets entirely and manage our own config. This obviously has huge implications so we'd rather exhaust other options first. |
Beta Was this translation helpful? Give feedback.
-
Originally opened by @stribb in cuelang/cue#817
I'm trying to figure out how best to fit CUE into my company's monorepo, initially for Kubernetes but also to support other outputs and tooling.
Right now, we have a
deployment
directory that currently contains Kustomize trees. I'd like to transform these into.cue
files, but I'm struggling a bit to find out how to modularise things.While I'm starting out with the basics of CUE: making opinionated specifications for Kubernetes objects, and instantiating them; I'd like a CUE directory to be able to specify more high level applications in a manner akin to the Kubernetes Tutorial.
For now, I need a couple of things:
apply
ed to k8s, both for real and in dry-run modeIdeally:
I'm sure these are possible but there's a documentation gap between the Kubernetes Tutorial and a real-world production example.
Beta Was this translation helpful? Give feedback.
All reactions