Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 2.12 KB

chart-repo.md

File metadata and controls

60 lines (41 loc) · 2.12 KB

Kubeapps chart-repo Developer Guide

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.

Prerequisites

Environment

export GOPATH=~/gopath/
export PATH=$GOPATH/bin:$PATH
export MONOCULAR_DIR=$GOPATH

Download the Monocular source code

git clone https://github.com/helm/monocular $MONOCULAR_DIR

The chart-repo sources are located under the cmd/chart-repo/ directory.

Install Kubeapps in your cluster

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.

Building the chart-repo image

cd $MONOCULAR_DIR
dep ensure
make -C cmd/chart-repo docker-build

This builds the chart-repo Docker image.

Running in development

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.

Running tests

You can run the chart-repo tests along with the tests for the Monocular project:

go test -v ./...