Helm plugin to manage multiple subcharts' values by env.
There's already simmilar project helm-values. But it doesn't meet my needs.
My needs are
- Helm doesn't support the env patch feature like kustomize
- I want to manage values.yaml by dividing in each subcharts
- The
values.yaml
,values.json
are no more programmable
So I decided to make my own tools for these.
-
init - Initiate the helm-values
-
generate - A helper tools to generate multiple manifests or templates in single command
-
build - This operation is a combination of combine, patch, merge
-
combine - Combine template(nunjucks, ejs) with data model
/mysql/prod.yaml.njk + /mysql/data.yaml -> /mysql/prod.yaml
-
patch - Patch
[stage].yaml
withbase.yaml
if it is avaiable/mysql/base.yaml + /mysql/prod.yaml -> /mysql/values.yaml
-
merge - Merge subcharts
/mysql/values.yaml + /redis/values.yaml -> /values.yaml
-
-
clean - A helper tools to clean the
values.yaml
and processed data
$ npm install -g helm-values
$ helm-values COMMAND
running command...
$ helm-values (-v|--version|version)
helm-values/0.1.0 linux-x64 node-v14.15.5
$ helm-values --help [COMMAND]
USAGE
$ helm-values COMMAND
...
helm-values build
helm-values clean [CHART]
helm-values combine [CHART]
helm-values generate [CHART]
helm-values help [COMMAND]
helm-values init
helm-values merge [CHART]
helm-values patch [CHART]
USAGE
$ helm-values build
OPTIONS
-f, --format=(yaml|json) [default: yaml] preferred format of manifest
-h, --help show CLI help
-o, --output=output path to output
-s, --stage=stage specify the stage to build
EXAMPLE
$ helm-values build
Build complete!
See code: src/commands/build.ts
USAGE
$ helm-values clean [CHART]
OPTIONS
-h, --help show CLI help
-s, --stage=stage stages to clean
--remove-subdirectory remove subdirectories in chart
EXAMPLE
$ helm-values clean
Everything is clear now!
See code: src/commands/clean.ts
USAGE
$ helm-values combine [CHART]
OPTIONS
-h, --help show CLI help
-s, --stage=stage [default: ] stage to Combine
EXAMPLE
$ helm-values combine -s dev -- mysql
Combine done!
See code: src/commands/combine.ts
USAGE
$ helm-values generate [CHART]
OPTIONS
-d, --data
-f, --format=(yaml|json) [default: yaml] preferred format of manifest
-h, --help show CLI help
-s, --stage=stage [default: ] stages to generate (If you do not specify the stages, then it will refer the
stages values in '/values/.helmvalues')
-t, --template=(njk|ejs) preferred template of manifest
--base-only don't generate base.yaml or base.json
--no-base generate only base
EXAMPLES
$ helm-values generate
Generate mysql, redis successfully!
$ helm-values generate -- mysql redis
Generate mysql, redis successfully!
$ helm-values generate -s prod dev test -- mysql redis
Generate mysql, redis successfully!
See code: src/commands/generate.ts
display help for helm-values
USAGE
$ helm-values help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
USAGE
$ helm-values init
EXAMPLE
$ helm-values init
Initiate helm-values!
See code: src/commands/init.ts
USAGE
$ helm-values merge [CHART]
OPTIONS
-f, --format=(yaml|json) [default: yaml] preferred format of manifest
-h, --help show CLI help
-p, --print print the output in your console
EXAMPLE
$ helm-values merge
Merge done!
See code: src/commands/merge.ts
USAGE
$ helm-values patch [CHART]
OPTIONS
-f, --format=(yaml|json) [default: yaml] preferred format of manifest
-h, --help show CLI help
-p, --print print the output in your console
-s, --stage=stage (required) stage to patch
EXAMPLE
$ helm-values patch -s dev -- mysql
Patch done!
See code: src/commands/patch.ts