The Helmify tool creates helm charts based on kustomized output. The tool consumes dictionary defined in tools/helmify/src/config.yaml
to generates helm charts based on kustomization outputs. To run the tool, simply run make helmify
in the root directory. You can also comment out components defined in Components
inside the kustomize_to_helm_automation.py
script to helmify only the components you want.
First, make sure you have kubeflow upstream repo cloned. Then run make install-tools
in the root directory to have all the necessary tools.
Step 1. Define kubeflow component config dictionary(tools/helmify/src/config.yaml): EXAMPLE without deployment_option subfolder in chart:
dex:
kustomization_paths:
- upstream/common/dex/overlays/istio
output_helm_chart_path: charts/common/dex
version: 0.1.0
app_version: v2.24.0
EXAMPLE with deployment_option subfolder in chart:
kubeflow-pipelines:
deployment_options:
vanilla:
kustomization_paths:
- awsconfigs/apps/pipeline/base
output_helm_chart_path: charts/apps/kubeflow-pipelines/vanilla
version: 0.1.1
app_version: 2.0.0-alpha.5
rds-s3:
kustomization_paths:
- awsconfigs/apps/pipeline
output_helm_chart_path: charts/apps/kubeflow-pipelines/rds-s3
version: 0.1.1
app_version: 2.0.0-alpha.5
rds-only:
kustomization_paths:
- awsconfigs/apps/pipeline/rds
output_helm_chart_path: charts/apps/kubeflow-pipelines/rds-only
version: 0.1.1
app_version: 2.0.0-alpha.5
s3-only:
kustomization_paths:
- awsconfigs/apps/pipeline/s3
output_helm_chart_path: charts/apps/kubeflow-pipelines/s3-only
version: 0.1.1
app_version: 2.0.0-alpha.5
Step 2. Define kubeflow component config dictionary (tools/helmify/template/values_config.yaml)
Step 3. Run Script with make helmify
in kubeflow-manifests root dir
Step 4. Check if potential failed yaml files exist in tools/helmify/generated_output/helm_chart_temp_output_files
The Tool generated the helm charts with the following workflow:
- Check if the component has multiple deployment options, if yes the chart path will be embedded with subfolders.
- Configure
params.env
andvalues.yaml
files based on the component dictionarytools/helmify/template
before runningkustomize build
- Generate kustomized consolidated files based on the paths defined, and store the outputs in
tools/helmify/generated_output/kustomized_output_files/<chart_name>
. - Split the generated kustomized files into individual yaml files and organized into folders based on
Kind
. - Create helm charts with
helm create
, clean up unnecessary template files, update chart versions. - Override chart
values.yaml
file inside the template folder to the targeted chart directory , otherwise thevalues.yaml
will be null. - Find potential failed yaml files in the previously generated splitted yaml files (syntax error such as the yaml file defination involves
{{ }}
) Escape Curly Braces in Helm Chart - Moved the splitted files into corresponding chart folders if no issues are found, otherwise the chart contents remain in
tools/helmify/generated_output/helm_chart_temp_output_files
for developer to verify. (example:tools/helmify/generated_output/helm_chart_temp_output_files/istio-1-14
tocharts/common/istio-1-14
)
path: tools/helmify/generated_output/kustomized_output_files/splitted_output
This folder stores the splitted yaml files based on the consolidated kustomized yaml during script run time. The files will be eventually moved to tools/helmify/generated_output/helm_chart_temp_output_files
after script is run.
path: tools/helmify/generated_output/helm_chart_temp_output_files
This folder stores temporary splitted helm chart output files. The files will be moved to chart folder if no potential failed files are found (files with {{ or }} inside
), otherwise the files will remain here until developer verifies all the files are valid.
path: tools/helmify/generated_output/kustomized_output_files
This folder stores the consolidated kustomized yaml based on the input kustomize paths.