An app to provide a bridge between Harbor helm chart hosting and Helm native repos.
Find a file
Alan Bridgeman 7bbdbc3c74
Some checks failed
Build and deploy Harbor Helm Index to QA/Stagging (private Kubernetes cluster) / build (push) Failing after 1m2s
Build and deploy Harbor Helm Index to QA/Stagging (private Kubernetes cluster) / deploy (push) Has been skipped
Bumping version to trigger automation
2025-06-19 02:44:04 -05:00
.forgejo/workflows Attempting to fix automation 2025-06-19 02:29:39 -05:00
src Added files to fix build issues 2025-06-19 02:39:46 -05:00
.gitignore Fixed some files related to dependencies for building the image 2025-06-19 02:33:21 -05:00
Dockerfile Fixed some files related to dependencies for building the image 2025-06-19 02:33:21 -05:00
gulpfile.mjs Initial commit 2025-02-17 16:19:35 -06:00
LICENSE Initial commit 2025-02-17 15:51:35 -06:00
package.json Bumping version to trigger automation 2025-06-19 02:44:04 -05:00
README.md Initial commit 2025-02-17 16:19:35 -06:00
tsconfig.json Initial commit 2025-02-17 16:19:35 -06:00
yarn.lock Fixed some files related to dependencies for building the image 2025-06-19 02:33:21 -05:00

Harbor Helm Index

The Harbor Helm Index software was designed for one very specific purpose. To expose Helm charts hosted in Harbor as if it was a Helm native repository. More specifically, to be able to use an easier to remember human oriented name for charts rather than a URI.

Getting Started

There are a few different ways you can run the software

Helm Chart

As you might imagine for a tool that is intended to work with Helm the easiest way to deploy it is to use helm (yes, by doing this, you would be making use of this software)

helm repo add BridgemanAccessible https://helm.bridgemanaccessible.ca/
helm install my-helm-index BridgemanAccessibe/harbor-helm-index

Docker

You could deploy the docker container locally. However, this would involve being a lot more explicit about environment variables.

docker run --name my-helm-index \
  --env NODE_ENV=development \
  --env PORT=8080 \
  --env COMPANY="My Company" \
  --env WEBSITE_TITLE_SUFFIX=" - My Company Helm Repo" \
  --env HOSTNAME="helm.exmaple.com" \
  --env DB_HOST="postgres.db.example.com" \
  --env DB_NAME=harbor_helm_index \
  --env DB_PASSWORD="Pa55w0rd!" \
  --env DB_PORT=5432 \
  --env DB_USER=helm_index \
  --env CACHE_HOSTNAME="redis.example.com" \
  --env CACHE_PORT=6379 \
  --env CACHE_PASSWORD="Pa55w0rd!" \
  harbor-helm-image

Node

You could run it with Node by running yarn start. However, similar to Docker you would need to figure out a way to inject the needed environment variables.

How It Works

There are two primary parts to how the software works.

The Harbor part which involves receiving information about Helm charts as their uploaded or deleted from the registry.

The Helm part which involves exposing a specific index.yaml file for the Helm CLI to consume.

The following subsections will go into this in more details

Harbor Webhooks

Luckily, Harbor offers us an easy and efficient way to have an event driven architecture as it relates to getting information about uploaded and deleted charts. More specifically, this is done through the use of webhooks which allows Harbor to send a notifying request to an endpoint exposed by this software.

The endpoint configured is /harbor.

Helm's index.yaml

Helm's repo commands requires that the repository exposes a index.yaml file at it's root about the available charts. This is generated automatically by this software.