Skip to content

dedalus-enterprise-architect/template2helm-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

  • python 3.5+
  • docker 20+ is required to run the template2helm binary and its dependencies from within a container
  • helm 3+

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:

  • AWS ECR keys: access_key_id secret_access_key region

  • utility_image : this is the utility image. [default: public.ecr.aws/dedalus-ea/ea-utils:latest]

  • target_image : the target image where the Openshift Template is stored in.

  • project_root_directory : this is the working dir [i.e. : /opt/projects/folder]

  • src_template_name : this is the default Openshift Template Name [default: dedalus.template.yml]

  • helm_chart_name : this is the folder name where the helm package is being created

  • project_version : specify here the helm chart version. WARNING: this value must match with the APP_VERSION value from within the Openshift Template

  • github_pat : this is the github_pat as required by the Helm Chart Repository on GitHub (OPTIONAL)

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

About

template2helm-py is a pythonic utility that help to converts OpenShift templates into Helm charts faster.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages