yamlforge

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 1 Imported by: 0

README

yamlforge

yamlforge is a tool to produce YAML (or JSON) using pipelines.

Usage

Take a look at our examples in the examples/ directory for comprehensive examples.

Here's an example that renders a Helm chart using dynamically rendered values.yaml:

yfg generate ./examples/helm-templated-values.yaml

You use yfg explain to get details on the different fields available:

yfg explain config

Or you can use yfg json-schema to print the JSON Schema for yamlforge configurations.

Concepts

yamlforge is built on the concept of pipelines and generators.

A generator is something which generates or produces some text (typically YAML or JSON), it's pretty open-ended.

A pipeline in a series of generators that are composed together to produce your YAML output.

Why

One of the most common problems I see when trying to define IIAC for Kubernetes is repetition and lack of composability across tools.

With yamlforge, you can use existing tools, and combine them where it makes sense, and supplement their missing features with the generators that yamlforge provides.

Use Cases

The best way to understand yamlforge is to look at the examples.

A common pain point in Helm is that your values.yaml is often duplicated across many environments. You can have multiple values files to help split it up, but sometimes you want logic to determine if a value should be set, or you want to generate some of the values based on other configuration options.

Using the gotemplate generator with the helm generator in yamlforge enables you do this.

For an example take a look at examples/helm-templated-values.yaml.

Documentation

Overview

Copyright © 2024 NAME HERE <EMAIL ADDRESS>

Directories

Path Synopsis
pkg
mapmerge
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
tools
gen-jsonschema
This program generates schema.json
This program generates schema.json

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL