Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/holgerjh/helm-schema
Plugin for helm that adds a "schema" command to generate JSON Schemas from charts.
https://github.com/holgerjh/helm-schema
helm helm-chart helm-plugin jsonschema jsonschema-generator verification
Last synced: about 1 month ago
JSON representation
Plugin for helm that adds a "schema" command to generate JSON Schemas from charts.
- Host: GitHub
- URL: https://github.com/holgerjh/helm-schema
- Owner: holgerjh
- License: apache-2.0
- Created: 2022-04-26T18:45:54.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-28T16:17:40.000Z (over 2 years ago)
- Last Synced: 2023-11-16T17:28:18.182Z (about 1 year ago)
- Topics: helm, helm-chart, helm-plugin, jsonschema, jsonschema-generator, verification
- Language: Shell
- Homepage:
- Size: 31.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Helm Plugin for Schema Generation
This is a plugin for helm that adds the `helm schema` command.
## Demo
![demo](https://github.com/holgerjh/helm-schema/blob/main/demo.svg?raw=true)
## Installation
* Run `helm plugin install https://github.com/holgerjh/helm-schema`.
* Run `helm schema`. It should output a help.
## Usage
### Schema Creation
The syntax to create a JSON Schema from files FILE-1 ... FILE-N is:
`helm schema create FILE-1 [-f FILE-2] [-f ...] [-f FILE-N] [-o OUTPUT-FILE]`.
To create a schema from a chart with a single values.yaml:
`helm schema create values.yaml -o values.schema.json`
To create a schema from a chart with multiple yaml files:
`helm schema create values.yaml -f my-other-values.yaml -o values.schema.json`
#### Options
The following options are available:
| Option | Description |
| ----------------------- | ------------------------------------------ |
| `-a`, `--allow-additional` | Generates a schema that allows unknown object properties that were not encountered during schema generation. Useful for generating a schema from an incomplete `values.yaml`. Default: false |
| `-f`, `--file stringArray` | Additional file that will be merged into main file before creating the schema. Can be specified mulitple times. |
| `-h`, `--help` | help for create |
| `-d`, `--id string` | Fill the schema $id field. |
| `-m`, `--merge-only` | Do not generate a schema. Instead, output the YAML result of the merge operation. Default: false |
| `-o`, `--output string` | Output file. Default is STDOUT. |
| `-r`, `--require-all` | Generates a strict schema that requires all keys to be present. Default: false |### Schema Verification
Verify the newly generated schema against the chart: `helm lint .`
## Restrictions
Currently only linux is supported.
## Uninstall
Run `helm plugin uninstall schema`.
No koalas 🐨 were hurt in the making of this plugin.