A simple Helm registry for store and share Helm package
This project is for have a simple Helm registry and a web admin UI for manage registry. There are 2 parts :
- Backend : Build in Go, API for store Helm package
- Frontend : Build in ReactJS, for Web UI to manage Helm registry
These parts are Docker images, that you use and deploy him in Docker env.
- Expose
index.yaml
file and/charts/*.tgz
charts, according to the Helm registry requirement - Chart Discovery : Automatically insert/update/delete charts from the charts directory, in database and update the
index.yaml
file. - Chart Discovery : Browse all
.tgz
files and open them to search fileChart.yaml
inside, extract chart information and send this to the Database and updatingindex.yaml
file. - Customize the home page of the registry (
/
) with a CRD (helm
) to describe your registry.
- On Windows
- On Linux
- On Docker, use the Docker image to deploy this registry on Docker env. You can use a Docker Compose file to deploy this (an exemple here)
The Helm client-side commands that you can use with this registry. Doc here
- helm repo add : Able to add the registry in your Helm client
- helm repo update : Update your client copy of your distant registry to be able to pull chart
- helm search repo : Able to list all charts available in your registry
- helm pull : Able to pull a chart from your registry to use it
- helm push : Currently unable to push a chart into this registry (maybe in newer version)
- credentials flags (--pass-credentials, --password, --password-stdin and --username) : Currently any credential is required to use the registry (in coming in newer version)
You need to have the corresponding Golang version installed.
Download the zip or clone this repository, and go to to backend
folder. Execute these following commands
Download packages :
go mod download
Run the app :
go run .
Download the file Helm-Registry-x.x.x_linux.tar.gz
from release artifacts in your Linux system.
Uncompressed the archive with the following command :
tar -xzvf Helm-Registry-1.0.0_linux.tar.gz
I recommend to uncompressed this archive in the path
/app/helm-registry/
. It's better to regroup all files in a same folder.
Adding permissions to execute the app
chmod +x helm-registry
And launch the app
./helm-registry
After first app launch, that created some files behind the app (like sqlite db and index.yaml
) and create (if not exist) charts directory (default: /usr/helm-registry/charts).
Download the .exe file from release artifacts and place it wherever you want. Execute the file and voilà !
That create registry.db
and index.yaml
. So it is better to place it in a specific folder.
From image archive .tar, load the image :
docker load -i Helm-Registry-x.x.x_docker.tar
Run Docker container :
docker run helm-registry:x.x.x
With flags :
docker run -p 8080 --mount type=volume,target=/usr/helm-registry/charts,dst=/charts helm-registry:x.x.x
It exists some environment variables to customize the registry.
Variable | Description |
---|---|
REGISTRY_NAME |
Name of the registry |
REGISTRY_DESCRIPTION |
A description of the registry |
REGISTRY_VERSION |
Version of the registry |
REGISTRY_MAINTAINER |
Name of the registry maintainer. Can be a person or an organisation |
REGISTRY_MAINTAINER_URL |
URL of the website or email address of the registry maintainer |
REGISTRY_LABELS |
List (separated by ';') of labels. E.g : env:prod;project:test |
CHARTS_DIR |
Path of charts directory location. By default : for Linux /usr/helm-registry/charts , Windows %USERPROFILE%\Documents\helm-registry\charts |
- [v1] First API version with basic actions for a simple usage. According to the Helm repository requirements
All files on this project is under Apache License v2. You can:
- Reuse the code
- Modified the code
- Build the code
You must Mention the © Copyright if you use and modified code for your own profit. Thank you
© 2024 - Benjamin Fourmaux -- Beruet - All right reserved