Giter Club home page Giter Club logo

chart-doc-gen's Introduction

Go Report Card Build Status Github All Releases Twitter

chart-doc-gen

Helm Chart Documentation Generator

$ chart-doc-gen -d=./testdata/doc.yaml -v=./testdata/values.yaml > ./testdata/README.md

Installation

Download the pre-built binaries from release page and copy to your $PATH directory. If you are using Go modules, you can install like below:

go get -u kubepack.dev/[email protected]

How does it work

chart-doc-gen takes a doc.yaml file and fills it with a values table auto generated from a chart values file. Then it renders to stdout a README.md file based on readme template.

chart-doc-gen walks a chart values file and generates a row for each leaf node in the values YAML document. The description of each leaf node must be written above it in comments. You can find an example generated README.md from a values file.

Sometimes you may provide an object as default value for a parameter. To break out from the tree walk in that case, add a line comment +doc-gen:break to the right of the parameter.

+doc-gen:break example +doc-gen:break preview

You can also add an example for --set key=value command in the comments. To do so, add a line # Example: and write the example commands in the comments below. The example lines will be broken by <br > in the generated values table.

values example values example preview

Use with CI

You can use this tool in CI pipelines to ensure that your chart readme is up-to-date. You can use a Makefile with targets like below:

.PHONY: gen
gen: gen-chart-doc

.PHONY: gen-chart-doc
gen-chart-doc:
	@echo "Generate chart docs"
	@chart-doc-gen -d=./testdata/doc.yaml -v=./testdata/values.yaml > ./testdata/README.md

.PHONY: verify
verify: verify-gen

.PHONY: verify-gen
verify-gen: gen fmt
	@if !(git diff --exit-code HEAD); then \
		echo "generated files are out of date, run make gen"; exit 1; \
	fi

chart-doc-gen's People

Contributors

tamalsaha avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.