Skip to content

Commit de6c1e5

Browse files
authored
Merge branch 'main' into hbc/karp-offering-cache
2 parents 2c309d7 + 1fa786f commit de6c1e5

1 file changed

Lines changed: 63 additions & 2 deletions

File tree

docs/dev/release.md

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ Each component uses a prefixed tag to trigger its release workflow:
99
| Component | Tag pattern | Example | Workflow |
1010
|-----------|------------|---------|----------|
1111
| CLI | `cli/v<semver>` | `cli/v1.2.3` | `.github/workflows/cli-release.yaml` |
12-
| Karpenter | `karpenter/v<semver>` | `karpenter/v0.5.0` | `.github/workflows/karpenter-publish.yaml` |
12+
| Karpenter image | `karpenter/v<semver>` | `karpenter/v0.5.0` | `.github/workflows/karpenter-publish.yaml` |
13+
| Karpenter Helm chart | `karpenter-chart/v<semver>` | `karpenter-chart/v0.2.0` | `.github/workflows/karpenter-chart-release.yaml` |
1314

1415
All tags must follow [Semantic Versioning](https://semver.org/).
1516

@@ -102,8 +103,68 @@ The workflow runs on:
102103

103104
---
104105

106+
## Karpenter Helm Chart Release
107+
108+
The Karpenter Helm chart workflow packages the chart in `karpenter/charts/karpenter/` and publishes it as an OCI artifact to GHCR. A GitHub Release is also created when triggered by a tag.
109+
110+
### Chart OCI reference
111+
112+
```
113+
oci://ghcr.io/<owner>/aks-flex/charts/karpenter:<version>
114+
```
115+
116+
### Triggers
117+
118+
The workflow runs on:
119+
120+
- A `karpenter-chart/v*` tag push (packages, pushes, and creates a GitHub Release).
121+
- Manual `workflow_dispatch` with an optional version override.
122+
123+
### Steps
124+
125+
1. Make sure all changes are merged to `main`.
126+
127+
2. Update `karpenter/charts/karpenter/Chart.yaml` if the `version` field does not already reflect the release version you want to publish.
128+
129+
3. Decide on a chart version (e.g. `v0.2.0`).
130+
131+
4. Create and push the tag:
132+
133+
```bash
134+
git tag karpenter-chart/v0.2.0
135+
git push origin karpenter-chart/v0.2.0
136+
```
137+
138+
5. The [Release Karpenter Helm Chart](../../.github/workflows/karpenter-chart-release.yaml) workflow runs automatically. Monitor it in the **Actions** tab.
139+
140+
6. Once complete:
141+
- The chart is available from the OCI registry:
142+
143+
```bash
144+
helm install karpenter oci://ghcr.io/<owner>/aks-flex/charts/karpenter \
145+
--version 0.2.0 \
146+
--namespace kube-system
147+
```
148+
149+
- A GitHub Release named **Karpenter Helm Chart v0.2.0** is created under **Releases** with the `.tgz` archive attached.
150+
151+
### Local Chart Build
152+
153+
To lint and package the chart locally without publishing:
154+
155+
```bash
156+
cd karpenter
157+
./hack/release-chart.sh # lint + package using Chart.yaml version
158+
./hack/release-chart.sh --version 0.2.0 # lint + package with a specific version
159+
```
160+
161+
The `.tgz` is written to `.helm-packages/karpenter-<version>.tgz` at the repository root.
162+
163+
---
164+
105165
## Troubleshooting
106166

107-
- **Workflow did not trigger** -- Verify the tag matches the expected pattern exactly (`cli/v*` or `karpenter/v*`). Tags like `CLI/v1.0.0` or `v1.0.0` without a prefix will not trigger the workflows.
167+
- **Workflow did not trigger** -- Verify the tag matches the expected pattern exactly (`cli/v*`, `karpenter/v*`, or `karpenter-chart/v*`). Tags like `CLI/v1.0.0` or `v1.0.0` without a prefix will not trigger the workflows.
108168
- **GoReleaser fails with "tag is not a semver"** -- Ensure the portion after the prefix is valid semver (e.g. `v1.2.3`, not `v1.2`).
109169
- **Permission denied on release** -- The workflow requires `contents: write` permission. This is configured in the workflow file but may need to be allowed in the repository settings if the default token permissions are restricted.
170+
- **Helm chart package not found** -- The `release-chart.sh` script expects the chart to be at `karpenter/charts/karpenter/`. Ensure the `Chart.yaml` exists there and the `version` field is set before running the workflow.

0 commit comments

Comments
 (0)