Skip to content

hangyan/chart-registry

 
 

Repository files navigation

ChartRegistry

Go Report Card

ChartRegistry is an open-source Helm Chart Repository server written in Go (Golang), mainly use OCI registry as storage backend.

Powered by some great Go technology:

Why this project

Helm 3 support OCI for package distribution.Chart packages are able to be stored and shared across OCI-based registries. However, it's a little inconvenient to use this feature, there are sperated sub-command to create and use chart in OCI registries. ChartMuseum also does not support use OCI registry as backend storage. So this project combines the idea, it's based on chartmuseum, use OCI registry as storage backend, and act as an nomral http repo for helm client. The current implementation have limited features, auth support is not tested yet, but it will be added soon. Also welcome to all kinds of issues and contributions.

Usage

Using binary

Download the binary from Release page. If you already have an registry running ,you can just running

chmod a+x chart-registry
./chart-registry --storage=registry --storage-registry-repo=localhost:5000 --debug  --port=8080

localhost:5000 should the url of your registry. If you don't have a running registry for now, you can install one using the following command:

docker run -d \
  -p 5000:5000 \
  --restart=always \
  --name registry \
  registry:2

Using Docker

We will need the following things to start:

  • A docker network
  • An OCI registry, which will act as the storage backend for chart-registry
  • ChartRegistry Service
docker network create registry

docker run -d --restart=always --name=registry --network=registry \
	-e REGISTRY_HTTP_ADDR=0.0.0.0:443 \
	-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \
	-e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \
	-p 443:443 \
	hangyan/https-registry:2

docker run -d -p 8080:8080 --restart=always --name=chart-registry  \
	-e DEBUG=1 -e STORAGE=registry -e STORAGE_REGISTRY_REPO=registry \
	--network=registry index.alauda.cn/claas/chart-registry:latest

Ready to use Helm

Then, we can use a Helm(2 or 3) client to fetch/upload charts in this repo

helm repo add oci http://127.0.0.1:8080
helm repo update

# create a simple chart to test
helm create simple-pod
helm package simple-pod
curl -v --fail -F chart=@simple-0.1.0.tgz http://127.0.0.1:8080/api/charts

# update and fetch
helm repo update
helm fetch oci/simple-pod

If you are using helm 3 and the chart-registry binary, you can use the helm command to check the oci charts

export HELM_EXPERIMENTAL_OCI=1
helm chart list

For other functionality, please check the chartmuseum/chartmuseum project.

Packages

No packages published

Languages

  • Go 88.6%
  • Python 5.6%
  • Shell 2.6%
  • RobotFramework 1.6%
  • Makefile 1.5%
  • Dockerfile 0.1%