The chart-repo
component is tool that scans a Helm chart repository and populates chart metadata in a MongoDB server. This metadata is then served by the chartsvc
component. Its source is maintained in the Monocular project repository.
- Git
- Make
- Go programming language
- Docker CE
- Kubernetes cluster (v1.8+). Minikube is recommended.
- kubectl
- Telepresence
export GOPATH=~/gopath/
export PATH=$GOPATH/bin:$PATH
export MONOCULAR_DIR=$GOPATH
git clone https://github.com/helm/monocular $MONOCULAR_DIR
The chart-repo
sources are located under the cmd/chart-repo/
directory.
Kubeapps is a Kubernetes-native application. To develop and test Kubeapps components we need a Kubernetes cluster with Kubeapps already installed. Follow the Kubeapps installation guide to install Kubeapps in your cluster.
cd $MONOCULAR_DIR
dep ensure
make -C cmd/chart-repo docker-build
This builds the chart-repo
Docker image.
export MONGO_PASSWORD=$(kubectl get secret --namespace kubeapps kubeapps-mongodb -o jsonpath="{.data.mongodb-root-password}" | base64 --decode)
telepresence --namespace kubeapps --docker-run -e MONGO_PASSWORD=$MONGO_PASSWORD --rm -ti quay.io/helmpack/chart-repo /chart-repo sync --mongo-user=root --mongo-url=kubeapps-mongodb stable https://kubernetes-charts.storage.googleapis.com
Note that the chart-repo should be rebuilt for new changes to take effect.
You can run the chart-repo tests along with the tests for the Monocular project:
go test -v ./...