News for hackers. Stuff that matters.

Show HN: An opinionated way to build and maintain complex YAML documents

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 comment | on HN )
Re:Show HN: An opinionated way to build and maintain complex... by verdverm on Monday March 21, 2022 @06:36PM (#30760647)
Going to drop some CUE links... as it's a more formal way with lots of other benefits

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