feat(release): publish Helm chart to OCI repo on release#253
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #253 +/- ##
==========================================
- Coverage 79.64% 77.75% -1.89%
==========================================
Files 8 8
Lines 393 517 +124
==========================================
+ Hits 313 402 +89
- Misses 80 115 +35 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@Vedansh074 this would also have to be backported to v0.5.x, v0.6.x, and v0.7.x branches |
48770f7 to
068d306
Compare
There was a problem hiding this comment.
Pull request overview
Adds the Nutanix CCM Helm chart to this repository and extends the existing release workflow so a Git tag release publishes both the controller image and a matching Helm chart to GHCR as an OCI artifact.
Changes:
- Introduces
charts/nutanix-cloud-provider/(templates, values, docs) for the CCM Helm chart. - Updates
.github/workflows/release.yamlto lint, package, and push the chart toghcr.io/...on tag releases. - Updates root and chart docs to describe OCI-based Helm install/upgrade.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds OCI Helm installation instructions and links to the chart README. |
| .github/workflows/release.yaml | Adds Helm/chart-testing setup, linting, packaging, and OCI push to GHCR during release. |
| charts/nutanix-cloud-provider/Chart.yaml | Adds chart metadata and placeholder version/appVersion for release-time override. |
| charts/nutanix-cloud-provider/README.md | Documents OCI install/upgrade/uninstall and configuration values. |
| charts/nutanix-cloud-provider/values.yaml | Defines default chart values for Prism Central, image, scheduling, etc. |
| charts/nutanix-cloud-provider/.helmignore | Adds standard Helm packaging ignore patterns. |
| charts/nutanix-cloud-provider/templates/_helpers.tpl | Adds helper template definitions (labels/names). |
| charts/nutanix-cloud-provider/templates/cloud-provider-nutanix-deployment.yaml | Adds the CCM Deployment template. |
| charts/nutanix-cloud-provider/templates/cm.yaml | Adds ConfigMap templates including generated nutanix_config.json and CA bundle ConfigMap. |
| charts/nutanix-cloud-provider/templates/secret.yaml | Adds optional credentials Secret template. |
| charts/nutanix-cloud-provider/templates/rbac.yaml | Adds ServiceAccount, ClusterRole, and ClusterRoleBinding templates. |
| charts/nutanix-cloud-provider/templates/NOTES.txt | Adds post-install Helm notes output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
What this PR does
Right now the Nutanix CCM Helm chart is published from a separate place, so its
version drifts from the CCM image and releasing it is a manual, out-of-band step.
This PR brings the chart into this repo and makes our existing release workflow
publish it automatically — so every time we tag a CCM release, a matching Helm
chart is pushed to the same GHCR location we already use.
In short: tag
vX.Y.Z→ the workflow builds the image and shipsghcr.io/nutanix-cloud-native/chart/nutanix-cloud-provider:X.Y.Zalongside it.Why it's built this way
A couple of decisions worth calling out for review:
The chart is intentionally a copy of the currently published
0.5.6chart.I pulled the live chart from GHCR and matched it template-for-template and
value-for-value, so existing users'
values.yamlfiles and--setflags keepworking unchanged. The only differences are in
Chart.yaml(see below). If youwant to diff it against the published one, everything except
Chart.yamlisbyte-identical.
We publish with plain
helm package+helm push, notchart-releaser-action. The chart is consumed as an OCI artifact, andchart-releaser-actionis really for GitHub-Pages chart repos — it would alsocreate its own GitHub Releases and collide with the release this workflow
already produces. Plain package/push is simpler and matches how the chart is
actually distributed.
Version handling. The chart
versionuses the tag without the leadingv(e.g.
0.6.5, because Helm chart versions must be plain semver), whileappVersionkeeps thev(e.g.v0.6.5) so the chart's default image taglines up with the image this same job builds and pushes.
Changes
New chart —
charts/nutanix-cloud-provider/credentials Secret, plus helpers/NOTES — mirrored from the published chart.
Chart.yaml:version/appVersionare0.0.0placeholders that the releaseworkflow overwrites from the tag; I also dropped the version-specific
artifacthub.io/changesannotation so it doesn't go stale every release.Release workflow —
.github/workflows/release.yamlpackages: write(+contents: write) to thebuild_releasejob so itcan push to GHCR.
push it to
oci://ghcr.io/nutanix-cloud-native/chart.Docs
charts/.../README.md: fixed install/upgrade instructions to use the OCIregistry (they previously pointed at the old
nutanix.github.io/helmGitHub-Pages repo), cleaned up leftover "Nutanix-CSI" copy-paste text, corrected
a default value, and made the Contributing/Issues links absolute (the relative
../../issueslink was broken from the chart's directory depth).README.md: added an Installation section documenting the Helm/OCI installmethod, linking to the chart README.
How I tested it
helm lintpasses.nutanix_config.jsonis valid JSON.0.5.6chartexcept for the intentional
Chart.yamlchanges.v0.6.5release locally: producesnutanix-cloud-provider-0.6.5.tgz,the rendered image resolves to
controller:v0.6.5, and the push target isghcr.io/nutanix-cloud-native/chart/nutanix-cloud-provider:0.6.5.