Hacker News new | ask | show | jobs
Show HN: An opinionated way to build and maintain complex YAML documents
1 points by lucasepe 1554 days ago
A tool to build a YAML document from a directory tree containing YAML fragments.

It is useful everywhere complex YAML configuration is employed:

- CI pipelines - Crossplane Compositions - Kubernetes manifests, etc.

For instance, Kubernetes resources can be complex, and in turn make the YAML very verbose.

The aim is to make the document easier to reason about and maintain.

### How to use

`dirty` parses a directory tree:

- a directory is a yaml key - a file (a yaml fragment) has content that is rendered at the current indentation level

Check this Crossplane Composition as example: https://github.com/lucasepe/dirty/tree/main/testdata/platform-ref-aws/cluster/eks

Here the repo link: https://github.com/lucasepe/dirty

Regards, Luca

1 comments

Going to drop some CUE links... as it's a more formal way with lots of other benefits

https://cuelang.org | https://cuetorials.com