Skip to content

Commit de401e6

Browse files
authored
feat(helm): migrate chart publishing to GitHub Pages (#1257)
## Summary - Replace the tag-triggered OCI/GitHub Container Registry Helm publish workflow with Helm Chart Releaser on pushes to `main`. - Publish charts from `deployments/helm` through GitHub Releases and maintain the public Helm repository index on `gh-pages`. - Document the public repository at `https://leptonai.github.io/gpud` and migration from `oci://ghcr.io/leptonai/gpud` to `gpud/gpud`. - Bump the Helm chart `version` and `appVersion` to `0.12.5`. - Make `install.sh` accept both `0.12.5` and `v0.12.5`; it normalizes archive downloads to the v-prefixed release-artifact form. ## Versioning - Helm chart and container image tags use `0.12.5`. - Source release artifacts use the v-prefixed form, `v0.12.5`. - The Dockerfile and external-registry image build scripts remain unchanged. The image is still independently selected with `image.repository` and `image.tag`. ## Public chart usage After the chart release workflow has run: ```bash helm repo add gpud https://leptonai.github.io/gpud helm repo update helm upgrade --install my-gpud gpud/gpud \ --version 0.12.5 \ --create-namespace \ --namespace gpud ``` ## Validation - `ct lint --debug --all --config ./.github/configs/ct-lint.yaml --lint-conf ./.github/configs/lintconf.yaml --target-branch main` - `helm lint deployments/helm/gpud` - `bash -n install.sh` - Installer normalization check for both `0.12.5` and `v0.12.5` - `git diff --check`
1 parent b823fac commit de401e6

4 files changed

Lines changed: 47 additions & 64 deletions

File tree

.github/workflows/helm.yaml

Lines changed: 16 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,29 @@
1-
name: 'helm'
1+
name: Helm chart release
22

3-
on:
3+
"on":
44
push:
5-
tags:
6-
- 'v*'
5+
branches:
6+
- main
77

88
permissions:
9-
id-token: write
10-
packages: write
11-
12-
concurrency:
13-
group: ${{ github.workflow }}-${{ github.ref }}
14-
cancel-in-progress: true
15-
9+
contents: write
1610

1711
jobs:
18-
run:
12+
release:
1913
runs-on: ubuntu-latest
2014
steps:
21-
- name: "checkout"
22-
uses: actions/checkout@v4
15+
- uses: actions/checkout@v4
2316
with:
2417
fetch-depth: 0
2518

26-
- name: setup
27-
run: |
28-
wget https://github.com/helm/chart-testing/releases/download/v3.14.0/chart-testing_3.14.0_linux_amd64.tar.gz -O ct.tar.gz
29-
tar -xzf ct.tar.gz
30-
sudo mv ct /usr/local/bin/ct
31-
32-
wget https://get.helm.sh/helm-v3.19.2-linux-amd64.tar.gz -O helm.tar.gz
33-
tar -xzf helm.tar.gz
34-
sudo mv linux-amd64/helm /usr/local/bin/helm
35-
36-
- name: Install lint dependencies
37-
run: |
38-
python3 -m pip install --user --upgrade yamale yamllint
39-
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
40-
41-
42-
- name: Run chart-testing
43-
run: |
44-
TARGET_BRANCH="${{ github.event.repository.default_branch }}"
45-
if [ -z "$TARGET_BRANCH" ]; then
46-
TARGET_BRANCH="main"
47-
fi
48-
if [ "${{ github.event_name }}" = "pull_request" ]; then
49-
TARGET_BRANCH="${{ github.event.pull_request.base.ref }}"
50-
fi
51-
ct lint --debug --all --config ./.github/configs/ct-lint.yaml \
52-
--lint-conf ./.github/configs/lintconf.yaml \
53-
--target-branch "$TARGET_BRANCH"
54-
55-
- name: Run kubeconform
19+
- name: Configure Git
5620
run: |
57-
helm plugin install https://github.com/melmorabity/helm-kubeconform
58-
# Validate the Helm chart manifests with kubeconform.
59-
# Pass the chart path explicitly; the plugin errors if given the literal string "chart".
60-
helm kubeconform deployments/helm/gpud --verbose --summary --strict --exit-on-error
21+
git config user.name "$GITHUB_ACTOR"
22+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
6123
62-
- name: release
63-
if: startsWith(github.ref, 'refs/tags/')
64-
run: |
65-
CHART_NAME="$(grep -e "^name:" deployments/helm/gpud/Chart.yaml | awk '{print $2}')"
66-
CHART_VERSION="$(grep -e "^version:" deployments/helm/gpud/Chart.yaml | awk '{print $2}')"
67-
CHART_REGISTRY="oci://ghcr.io/chart"
68-
echo '${{ secrets.GITHUB_TOKEN }}' | helm registry login -u '${{ github.actor }}' --password-stdin 'ghcr.io'
69-
helm package deployments/helm/gpud
70-
echo "Pushing helm chart ${CHART_NAME}-${CHART_VERSION}.tgz to ${CHART_REGISTRY}"
71-
helm push "${CHART_NAME}-${CHART_VERSION}.tgz" "${CHART_REGISTRY}"
24+
- name: Release chart
25+
uses: helm/chart-releaser-action@v1.6.0
26+
with:
27+
charts_dir: deployments/helm
28+
env:
29+
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}

deployments/helm/gpud/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ apiVersion: v2
22
name: gpud
33
description: GPUd Helm chart for Kubernetes
44
type: application
5-
version: 0.12.2
6-
appVersion: "0.12.2"
5+
version: 0.12.5
6+
appVersion: "0.12.5"
77
icon: https://assets.nvidiagrid.net/ngc/logos/Infrastructure.png

deployments/helm/gpud/README.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,33 @@ GPUd is a lightweight, high-performance daemon that monitors GPU resources. This
1111

1212
## Installing the Chart
1313

14+
Add the GPUd chart repository:
15+
16+
```bash
17+
helm repo add gpud https://leptonai.github.io/gpud
18+
helm repo update
19+
```
20+
21+
### Migrating from the OCI chart registry
22+
23+
GitHub Container Registry no longer hosts GPUd charts. Replace an OCI install
24+
such as `oci://ghcr.io/leptonai/gpud` with the `gpud/gpud` chart after adding
25+
the repository above:
26+
27+
```bash
28+
helm upgrade --install my-gpud gpud/gpud \
29+
--version 0.12.5 \
30+
--create-namespace \
31+
--namespace gpud
32+
```
33+
34+
The container image remains independently configurable through
35+
`image.repository` and `image.tag`.
36+
1437
To install the chart with the release name `my-gpud`:
1538

1639
```bash
17-
helm install my-gpud <YOUR_REPO_NAME>/gpud \
40+
helm install my-gpud gpud/gpud \
1841
--create-namespace \
1942
--namespace gpud
2043
```
@@ -24,7 +47,7 @@ helm install my-gpud <YOUR_REPO_NAME>/gpud \
2447
To install with a specific image tag and disable telemetry:
2548

2649
```bash
27-
helm install my-gpud <YOUR_REPO_NAME>/gpud \
50+
helm install my-gpud gpud/gpud \
2851
--create-namespace \
2952
--namespace gpud \
3053
--set image.tag="<MY_IMAGE_TAG>" \
@@ -34,7 +57,7 @@ helm install my-gpud <YOUR_REPO_NAME>/gpud \
3457
You can also provide a custom `values.yaml` file:
3558

3659
```bash
37-
helm install my-gpud <YOUR_REPO_NAME>/gpud \
60+
helm install my-gpud gpud/gpud \
3861
--namespace gpud -f my-values.yaml
3962
```
4063

@@ -168,7 +191,7 @@ Then install or upgrade with a values file like this (a full BYOK overlay):
168191
```yaml
169192
image:
170193
repository: nvcr.io/nvstaging/dgx-cloud-lepton/gpud
171-
tag: 0.12.2 # no "v" prefix from 0.12.2 onward
194+
tag: 0.12.5 # no "v" prefix from 0.12.2 onward
172195
173196
imagePullSecrets:
174197
- name: nvcr-staging-pull

install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ main() {
121121
# e.g., https://pkg.gpud.dev/unstable_latest.txt
122122
APP_VERSION=$(curl -fsSL https://pkg.gpud.dev/"$TRACK"_latest.txt)
123123
fi
124+
# Git release artifacts are v-prefixed; accept either input spelling.
125+
APP_VERSION="v${APP_VERSION#v}"
124126

125127
if ! type lsb_release >/dev/null 2>&1; then
126128
# Try /etc/os-release first

0 commit comments

Comments
 (0)