Skip to content

Helm plugin to manage multiple subcharts' values by env

Notifications You must be signed in to change notification settings

hoongeun/helm-values

Repository files navigation

helm-values

Helm plugin to manage multiple subcharts' values by env.

oclif Version Downloads/week License

Why I made this?

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.

How it works?

  • init - Initiate the helm-values

    helm-values-init

  • generate - A helper tools to generate multiple manifests or templates in single command

    helm-values-generate

  • 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

      helm-values-combine

    • patch - Patch [stage].yaml with base.yaml if it is avaiable /mysql/base.yaml + /mysql/prod.yaml -> /mysql/values.yaml

      helm-values-patch

    • merge - Merge subcharts /mysql/values.yaml + /redis/values.yaml -> /values.yaml

      helm-values-merge

  • clean - A helper tools to clean the values.yaml and processed data

    helm-values-clean

Usage

$ 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
...

Commands

helm-values build

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

helm-values clean [CHART]

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

helm-values combine [CHART]

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

helm-values generate [CHART]

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

helm-values help [COMMAND]

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

helm-values init

USAGE
  $ helm-values init

EXAMPLE
  $ helm-values init
  Initiate helm-values!

See code: src/commands/init.ts

helm-values merge [CHART]

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

helm-values patch [CHART]

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

About

Helm plugin to manage multiple subcharts' values by env

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published