All Projects → bitnami-labs → readme-generator-for-helm

bitnami-labs / readme-generator-for-helm

Licence: Apache-2.0 license
Auto generate READMEs for Helm Charts

Programming Languages

javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to readme-generator-for-helm

readme-generator
📦📝 Personal generator to simply create cool and efficients README.md
Stars: ✭ 32 (-71.43%)
Mutual labels:  readme, readme-generator
action-dynamic-readme
~ Dynamic ReadME Generator ~
Stars: ✭ 29 (-74.11%)
Mutual labels:  readme, readme-generator
Readme Md Generator
📄 CLI that generates beautiful README.md files
Stars: ✭ 9,184 (+8100%)
Mutual labels:  readme, readme-generator
github-profile-views-counter
Github new features README profile views counter made with Yii2 framework.
Stars: ✭ 158 (+41.07%)
Mutual labels:  readme, readme-generator
drone-gcloud-helm
Drone 0.5 plugin to create and deploy Helm charts for Kubernetes in Google Cloud.
Stars: ✭ 13 (-88.39%)
Mutual labels:  charts, helm
github-readme-linkedin
📋 A serverless application to get dynamically generated images from your LinkedIn profile on your GitHub READMEs
Stars: ✭ 52 (-53.57%)
Mutual labels:  readme, readme-generator
helm-swagger-ui
Helm Chart for Swagger UI
Stars: ✭ 23 (-79.46%)
Mutual labels:  charts, helm
Helmfiles
Comprehensive Distribution of Helmfiles for Kubernetes
Stars: ✭ 205 (+83.04%)
Mutual labels:  charts, helm
camunda-cloud-helm
Camunda Platform 8 Self-Managed Helm charts
Stars: ✭ 41 (-63.39%)
Mutual labels:  charts, helm
helm-charts
Source & Repo of https://charts.kubesphere.io/main & https://charts.kubesphere.io/test
Stars: ✭ 85 (-24.11%)
Mutual labels:  charts, helm
github-stats-generator
Generate your GitHub stats for your README with ease!
Stars: ✭ 31 (-72.32%)
Mutual labels:  readme, readme-generator
charts
Deploy Kubernetes Helm Charts for Check Point CloudGuard
Stars: ✭ 18 (-83.93%)
Mutual labels:  charts, helm
Charts
⚠️(OBSOLETE) Curated applications for Kubernetes
Stars: ✭ 15,319 (+13577.68%)
Mutual labels:  charts, helm
init-readme
An opinionated README.md generator for npm utility packages
Stars: ✭ 12 (-89.29%)
Mutual labels:  readme, readme-generator
Kubernetic
Kubernetic - Supercharge your Kubernetes clusters
Stars: ✭ 243 (+116.96%)
Mutual labels:  charts, helm
Metrics
📊 An infographics generator with 30+ plugins and 200+ options to display stats about your GitHub account and render them as SVG, Markdown, PDF or JSON!
Stars: ✭ 4,621 (+4025.89%)
Mutual labels:  readme, readme-generator
Helm Charts
Helm charts for Kubernetes curated by Kiwigrid
Stars: ✭ 151 (+34.82%)
Mutual labels:  charts, helm
Chartmuseum
Host your own Helm Chart Repository
Stars: ✭ 2,650 (+2266.07%)
Mutual labels:  charts, helm
helm-drupal
Helm chart for running Drupal on Kubernetes
Stars: ✭ 27 (-75.89%)
Mutual labels:  charts, helm
autobadge
Simple CLI tool to generate essential repository badges with ease
Stars: ✭ 16 (-85.71%)
Mutual labels:  readme, readme-generator

Readme Generator For Helm

  • Autogenerate Helm Charts READMEs' tables based on values YAML file metadata.
  • Autogenerate an OpenAPI compliant JSON schema defining the values.yaml structure of the Helm Chart. The file generated will be a JSON file formatted according to the OpenAPIv3 SchemaObject definition.

How it works

The tool expects some metadata for the descriptions in the provided values.yaml file. It will parse and check the metadata against the real values. If the metadata is consistent with the real values, it will generate and insert the values table into the provided README.md file. If the metadata is not correct, it will print the full list of errors. It checks whether there is metadata for non-existing values or there is missing metadata for an existing value.

The table that will be inserted into the readme.md will have the following structure:

## Parameters

### Section 1 title

| Name      | Description             | Default        |
|:----------|:------------------------|:---------------|
| `value_1` | Description for value 1 | `defaultValue` |
| `value_2` | Description for value 2 | `defaultValue` |
| `value_3` | Description for value 3 | `defaultValue` |

### Section 2 title

| Name      | Description             | Default        |
|:----------|:------------------------|:---------------|
| `value_1` | Description for value 1 | `defaultValue` |
| `value_2` | Description for value 2 | `defaultValue` |
| `value_3` | Description for value 3 | `defaultValue` |

...

The number of # characters needed for the section titles is dynamically calculated, and the title of the Parameters section can be configured via the configuration file. The README.md file with a # Parameters section must be created before running the tool.

Requirements

The project has been developed and tested with node version 16.x.

Install

Execute the following commands to install the tool:

$ git clone https://github.com/bitnami-labs/readme-generator-for-helm
$ npm install ./readme-generator-for-helm

Depending on how you installed NodeJS in your system, you may need to modify your PATH environment variable to be able to execute the tool.

Test

We use Jest to implement the tests. In order to test your changes, execute the following command:

$ npm run-script test

Lint

After modifying the code execute the following command to pass the linter:

$ npm run-script lint

Basic usage

Usage: readme-generator [options]

Options:
  -v, --values <path>  Path to the values.yaml file
  -r, --readme <path>  Path to the README.md file
  -c, --config <path>  Path to the config file
  -s, --schema <path>  Path for the OpenAPI Schema output file
  --version            Show Readme Generator version
  -h, --help           display help for command

values.yaml Metadata

For the tool to work, you need to add some metadata to your values.yaml file.

By default we use a format similar to Javadoc, using @xxx for tags followed by the tag structure.

The following are the tags supported at this very moment:

  • For a parameter: ## @param fullKeyPath [modifier?] Description.
  • For a section: ## @section Section Title".
  • To skip an object and all its children: ## @skip fullKeyPath.
  • To add a description for an intermediate object (i.e. not final in the YAML tree): ## @extra fullkeyPath Description.

All the tags as well as the two initial # characters for the comments style can be configured in the configuration file.

IMPORTANT: tags' order or position in the file is NOT important except for the @section tag. The @section that will include in the section all the parameters after it until a new section is found or the file ends.

The modifier is optional and it will change how the parameter is processed. Several modifiers can be applied by separating them using commas (,). When affecting the value, the last one takes precedence.

Currently supported modifiers:

  • [array] Indicates that the value of the parameter must be set to [].
  • [object] Indicates that the value of the parameter must be set to {}.
  • [string] Indicates that the value of the parameter must be set to "".
  • [nullable] Indicates that the parameter value can be set to null.

The modifiers are also customizable via the configuration file.

Configuration file

The configuration file has the following structure:

{
  "comments": {
    "format": "##"                               <-- Which is the comments format in the values YAML
  },
  "tags": {
    "param": "@param",                           <-- Tag that indicates a parameter
    "section": "@section",                       <-- Tag that indicates a section
    "descriptionStart": "@descriptionStart",     <-- Tag that indicates the beginning of a section description
    "descriptionEnd": "@descriptionEnd",         <-- Tag that indicates the end of a section description
    "skip": "@skip",                             <-- Tag that indicates the object must be skipped
    "extra": "@extra"                            <-- Tag to add a description for an intermediate object
  },
  "modifiers": {
    "array": "array",                            <-- Modifier that indicates an array type
    "object": "object"                           <-- Modifier that indicates an object type
    "string": "string"                           <-- Modifier that indicates a string type
    "nullable": "nullable"                       <-- Modifier that indicates a parameter that can be set to null
  },
  "regexp": {
    "paramsSectionTitle": "Parameters"           <-- Title of the parameters section to replace in the README.md
  }
}

Versions

2.4.0

Add descriptionStart and descriptionEnd config options (default tags: @descriptionStart and @descriptionEnd) to allow text block upfront each section table in README.md. When changing the tag values for these, ensure to not being conflicted with section config option.

If you are using a customized configuration file, please add the new default tags to prevent any incorrect behavior.

2.0.0

The -m (--metadata) option has been renamed to -s (--schema) in order to properly identify what it generates.

License

Copyright © 2023 Bitnami

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].