Publish helm charts also as an OCI package (e.g. on GHCR/ECR registry)
- Dominant language
- Mustache
- Stars
- 1.3k
- Forks
- 1.1k
- Avg merge
- 22m
- Merged PRs (30d)
- 5
Description
**Is your feature request related to a problem?**
No
**Is your feature request related to a specific Helm chart, if yes mention name of the chart?**
All helm charts
**Describe the solution you'd like**
The helm charts are published using the classic approach with a static webserver and an index.yaml (GitHub pages):
```bash
helm repo add eks https://aws.github.io/eks-charts
```
However in helm 3.8+ the OCI method went GA:
- https://blog.bitnami.com/2023/04/httpsblog.bitnami.com202304bitnami-helm-charts-now-oci.html?m=1
- https://helm.sh/docs/topics/registries/
- https://github.com/helm/helm/releases/tag/v3.8.0
I see two options to use as an OCI mirror:
- GHCR (Github packages)
You need to think about the Github organizational plan. (Free plan only includes 500MB)
- AWS ECR (where you mostly push your container images)
If you would fully rely on native Github actions to produce these artifacts, the change would be super simple
```yaml
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_GENERATE_RELEASE_NOTES: true
# ================
# below this line is relevant for OCI publishing
# ================
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push charts to GHCR
run: |
shopt -s nullglob
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts"
done
```
_Source: https://github.com/prometheus-community/helm-charts/blob/4bbd07f308884d44d0edff23ee60da967dc2cd23/.github/workflows/release.yaml#L39C1-L61C15_
Also a lot of other CNCF projects are using this approach.
**Describe alternatives you've considered**
Still using the old approach with the index.yaml and static website.
Contributor guide
Research direction
Start by locating the repository's GitHub Actions release workflow and its chart-releaser step, then inspect how packages are produced in .cr-release-packages. Read Helm's OCI registry documentation and compare GHCR with ECR, including the stated storage constraints. Done means all Helm charts are published as OCI packages while the existing chart repository behavior is preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, github-actions, helm
- Domain
- ci-cd, cloud, release
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100