Skip to content

Latest commit

 

History

History
84 lines (58 loc) · 2.57 KB

README.md

File metadata and controls

84 lines (58 loc) · 2.57 KB

Helm convert plugin

Charts are curated application definitions for Helm, this plugin let you convert existing charts into Kustomize compatible package.

Build Status Go Report Card GoDoc

Install

Helm plugin

$ helm plugin install https://github.com/ContainerSolutions/helm-convert

Binary without Helm

If you don't have Helm installed, you can just download the binary from the release page.

Usage

See helm convert --help for usage. Example:

# convert the stable/mongodb chart into Kustomize compatible package
helm convert --destination mongodb --name mongodb stable/mongodb

# convert chart from a url
helm convert https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/prometheus-operator

# convert the stable/mongodb chart with a given values.yaml file
helm convert -f values.yaml stable/mongodb

# convert the stable/mongodb chart and override values using --set flag:
helm convert --set persistence.enabled=true stable/mongodb

Docker

You can also execute Helm convert from Docker:

$ docker run -ti containersol/helm-convert convert --help

Development

# clone the repo
$ git clone [email protected]:ContainerSolutions/helm-convert.git

# add a symlink in the Helm plugin directory targeting the repository
$ ln -s $PWD ~/.helm/plugins/helm-convert

# build the binary
$ make build

# run
$ helm convert --help

# run lint, vet and tests
$ make test-all

Features

The conversion is currently quite basic and has the following features:

  • get image tags and store them in kustomization.yaml
  • get common labels and store them in kustomization.yaml
  • get resources and store them in kustomization.yaml
  • remove helm specific labels from manifests
  • remove helm specific annotations from manifests
  • get namespace and store it in kustomization.yaml
  • create secretGenerator based on secret resources (type Opaque and TLS)
  • create secretGenerator based on secret type TLS
  • create configGenerator from multiline files
  • handle datasources type literal, env files and source files