template2helm-py

Here is the Pythonic template2helm script to get an Helm Chart package by the Dedalus Enterprise Architect Team.

template2helm-py

This site was built by the project: template2helm-py

template2helm-py is a Pythonic utility that help to converts OpenShift Templates into Helm Charts fastest.

A command-line script to run all the steps summarized at Usage paragraph ahead providing the basic information to run each command in the list and letting the script work for you.

The actual configuration will be saved in a config.json file, to allow later connection to work without user input.

The main advantage in using this script is getting started with a very first draft of the Helm Chart starting from an Openshift Template.

Requirements

It follows the OS tools requirements:

Project Dependencies

Usage

It follow the step list covered by this script:

  1. get the aws ecr token

  2. get the Openshift Template

  3. convert the oc template to a helm chart base schema

  4. create the helm package (folder tree + archive)

  5. (disabled feature) push the helm package

Installation

Install the dependencies with pip:

pip install -r requirements.txt

Run

python init.py

The script is interactive and will ask you for some information better explained on the next sub paragraph.

Script Parameters

The initial execution of the script will fill a file named: “config.json” with the following keys:

{
    "access_key_id": "",
    "secret_access_key": "",
    "region": "",
    "utility_image": "public.ecr.aws/dedalus-ea/ea-utils:latest",
    "target_image": "image_url:image_tag",
    "project_root_directory": "/type_here_the_working_dir_full_path/test",
    "src_template_name": "dedalus.template.yml",
    "helm_chart_name": "dedalus-sample-webapp",
    "project_version": "x.y.z",
    "github_pat": "github_pat",
    "confirmation": true
}

where if follows the parameters meaning:

Conclusion

At the end of this procedure you’ll get a helm chart package in a draft status because it needed to complete with the customization your product needs.

for more information, please see the link