Skip to content

ci(helm): add chart release workflows#113

Open
spencercjh wants to merge 4 commits into
Project-HAMi:mainfrom
spencercjh:feat/release-chart
Open

ci(helm): add chart release workflows#113
spencercjh wants to merge 4 commits into
Project-HAMi:mainfrom
spencercjh:feat/release-chart

Conversation

@spencercjh

@spencercjh spencercjh commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Most of this Pull Request was generated or revised with the assistance of AI tools(Codex with GPT-5.6 Sol High). I have reviewed the resulting content and take full responsibility for its accuracy, security, licensing compliance, and inclusion in this project.

Summary

  • add a Helm lint workflow with path filtering and a stable required check
  • publish chart releases to GitHub Pages, GitHub Releases, and GHCR when the chart version changes or the workflow is dispatched manually
  • add Makefile targets for generated chart documentation, values schema generation, linting, and template rendering
  • preserve the existing installation guide while generating the chart metadata and values reference with helm-docs

Validation

  • make verify-helm-chart with Helm v3.20.0
  • actionlint .github/workflows/helm-lint.yaml .github/workflows/build-helm-release.yaml
  • repeated chart documentation and schema generation produced identical outputs
  • git verify-commit HEAD

Notes

  • Helm releases are serialized across refs to avoid concurrent gh-pages updates.
  • The GHCR namespace is normalized to lowercase before pushing the OCI chart.

Summary by CodeRabbit

  • New Features
    • Added comprehensive Helm chart documentation (README template + generated values section) including optional vNPU monitoring setup.
    • Introduced values.schema.json to define and validate configurable chart values.
    • Implemented automated Helm chart publishing to GHCR as an OCI artifact (manual and on version change).
  • Bug Fixes
    • Added CI checks to verify Helm docs/schema are synchronized and to run chart linting and template rendering.
  • Chores
    • Updated .gitignore with broader Linux/Go/macOS/IDE/worktree ignore patterns.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@spencercjh, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a2e72add-a102-4f28-98cc-988047b5e3bf

📥 Commits

Reviewing files that changed from the base of the PR and between 11dd4cb and aa8cc74.

📒 Files selected for processing (8)
  • .github/workflows/build-helm-release.yaml
  • .github/workflows/helm-lint.yaml
  • .gitignore
  • Makefile
  • charts/ascend-device-plugin/README.md
  • charts/ascend-device-plugin/README.md.gotmpl
  • charts/ascend-device-plugin/values.schema.json
  • charts/ascend-device-plugin/values.yaml
📝 Walkthrough

Walkthrough

Adds Helm chart documentation and schema generation, pull-request validation, push/manual OCI releases to GHCR, and expanded cross-platform repository ignore rules.

Changes

Helm chart automation

Layer / File(s) Summary
Chart values and documentation
charts/ascend-device-plugin/values.yaml, charts/ascend-device-plugin/values.schema.json, charts/ascend-device-plugin/README.md, charts/ascend-device-plugin/README.md.gotmpl
Adds documented values, a typed JSON schema, generated values reference content, installation guidance, and monitor/configuration examples.
Chart verification pipeline
Makefile, .github/workflows/helm-lint.yaml
Adds documentation/schema generation, chart lint/template checks, and pull-request gating for Helm-related changes.
Chart release publication
.github/workflows/build-helm-release.yaml
Adds version-change detection and push/manual workflows that package the chart and publish it to GHCR as an OCI artifact.

Repository maintenance

Layer / File(s) Summary
Ignore rule refresh
.gitignore
Replaces the ignore file with Linux, Go, macOS, editor, and worktree patterns.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant ChartVersion
  participant HelmChartReleaser
  participant GHCR
  GitHubActions->>ChartVersion: Read current and previous chart versions
  ChartVersion->>GitHubActions: Return version_changed
  GitHubActions->>HelmChartReleaser: Package chart and update gh-pages
  HelmChartReleaser->>GHCR: Push OCI chart artifact
Loading

Possibly related PRs

Suggested labels: approved

Suggested reviewers: archlitchi

Poem

I hop through charts where values bloom,
And tidy schemas clear the room.
Helm checks march in a careful line,
While OCI stars brightly shine.
A bunny ships releases tonight! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main CI addition: new Helm chart release workflows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hami-robot

hami-robot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Welcome @spencercjh! It looks like this is your first PR to Project-HAMi/ascend-device-plugin 🎉

@spencercjh

Copy link
Copy Markdown
Contributor Author

/assign archlitchi

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/build-helm-release.yaml:
- Around line 11-20: Add a workflow-level permissions default near the existing
env/concurrency configuration in the Helm release workflow, setting the GitHub
Actions token to read-only (contents: read). Keep the explicit elevated
permissions in release jobs unchanged.

In @.github/workflows/helm-lint.yaml:
- Around line 41-42: Update the actions/checkout step named “Checkout” in the
Helm lint workflow to set persist-credentials to false before make
verify-helm-chart runs, while leaving the existing checkout behavior and local
git diff functionality unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bec4860b-270d-4dd1-b877-1618e733c8ca

📥 Commits

Reviewing files that changed from the base of the PR and between f8ae57c and 9e01f3c.

📒 Files selected for processing (8)
  • .github/workflows/build-helm-release.yaml
  • .github/workflows/helm-lint.yaml
  • .gitignore
  • Makefile
  • charts/ascend-device-plugin/README.md
  • charts/ascend-device-plugin/README.md.gotmpl
  • charts/ascend-device-plugin/values.schema.json
  • charts/ascend-device-plugin/values.yaml

Comment thread .github/workflows/build-helm-release.yaml
Comment thread .github/workflows/helm-lint.yaml
@spencercjh

spencercjh commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

It's almost copied from https://github.com/dynamia-ai/ppu-vgpu-device-plugin

@spencercjh

Copy link
Copy Markdown
Contributor Author

/assign DSFans2014

Comment thread charts/ascend-device-plugin/values.yaml Outdated
@hami-robot

hami-robot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: spencercjh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@spencercjh
spencercjh force-pushed the feat/release-chart branch from 11dd4cb to e7a3bfb Compare July 16, 2026 02:37
Signed-off-by: Spencer Cai <jiahao.cai@dynamia.ai>
Signed-off-by: Spencer Cai <jiahao.cai@dynamia.ai>
Signed-off-by: Spencer Cai <jiahao.cai@dynamia.ai>
@spencercjh
spencercjh force-pushed the feat/release-chart branch from e7a3bfb to e97da30 Compare July 16, 2026 02:39
Comment thread .github/workflows/build-helm-release.yaml Outdated
workflow_dispatch:
push:
branches:
- main

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

release the chart if a new tag created

@spencercjh spencercjh Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented v* tag-triggered releases in aa8cc74.

One warning is that repository tags and Chart.yaml.version are independent, so a new repository tag may point to a chart version already published by an earlier main branch version bump. The workflow therefore treats chart artifacts as immutable: chart-releaser uses skip_existing, and GHCR checks the exact OCI chart version before pushing. Existing versions are skipped instead of overwritten; publishing new chart content still requires updating Chart.yaml.version.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we modify this version via parameters during helm packaging?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically, of course, it’s possible, but I think that when someone modifies the contents of a chart and wants to publish it for others to use, they should explicitly update the version in Chart.yaml. When templates change frequently, it’s perfectly normal for the patch version in the chart version to be very high. Of course, the maintainer can require restrictions on version increments and decide for themselves what the chart version should be.

I think implementing version updates by passing the version number into a GitHub workflow would make the whole process quite complicated. We’d have to modify the file first, commit and push it, and then perform the Helm packaging and release.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When templates change frequently, it’s perfectly normal for the patch version in the chart version to be very high.

Do you mean that the chart version should be independent from the entire project?

I think implementing version updates by passing the version number into a GitHub workflow would make the whole process quite complicated.

Getting the tag version in the workflow isn't complicated. Also, creating a new tag already means releasing a new version. If we require the release owner to update the version manually, it's easy to forget and end up with inconsistent version information.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the chart version can be independent from the application or repository version. However, I am not insisting that this project must use independent versioning. If the maintainers prefer to keep the repository tag, appVersion, and chart version aligned, that is a valid project policy.

I also agree that relying entirely on the release owner to remember updating Chart.yaml is error-prone. My concern is only that silently overriding the chart version during packaging may create a difference between the checked-in Chart.yaml and the published artifact.

I think CI validation would solve the problem more clearly.

For example, on a v1.3.1 tag, the workflow could verify that:

tag version        = 1.3.1
Chart.yaml version = 1.3.1
Chart.yaml appVersion = v1.3.1

If they do not match, the release should fail with a clear error asking the release owner to update Chart.yaml.

This gives us both properties:

  1. The project can keep the chart and application versions strongly aligned.
  2. Forgetting to update the version cannot result in an incorrect or missing release.

In other words, automation should prevent an inconsistent release, rather than silently changing the version of the packaged artifact.

If the project later needs to publish a chart-only fix without releasing a new application version, we can reconsider independent chart versioning at that point. But that is a separate versioning-policy decision.

The issue regarding chart versions has actually already come to light in HAMi. HAMi’s charts are already quite complex, and when we discover bugs in chart templates or default values, there’s currently no way to release a quick fix because it must be tied to the entire HAMi release. This causes users to miss out on many minor chart fixes, forcing them to fork the source code and release their own charts.

In the real world, there are numerous well-known open-source projects that use independent chart versions.

Project Chart version appVersion
kube-prometheus-stack 87.16.1 v0.92.1
Argo CD 10.1.3 v3.4.5
Grafana Loki 7.1.0 3.6.8
Traefik 41.0.2 v3.7.7
ingress-nginx 4.15.1 1.15.1
ExternalDNS 1.21.1 0.21.0
Bitnami PostgreSQL 17.1.0 17.6.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The chart version is part of the source and release metadata. Choosing and updating it correctly is one of the responsibilities of maintaining and releasing the chart, just like updating release notes or documenting compatibility changes. The maintainer should still decide whether a chart change requires a patch, minor, or major version bump.

Automation can help us enforce that responsibility. For example, CI can fail when a release tag is created but the expected fields in Chart.yaml were not updated. However, that validation should be a guardrail, not a replacement for maintaining the version correctly.

Automatically injecting the Git tag during packaging may prevent one kind of mistake, but it also hides the fact that the version recorded in the repository is stale. It makes the published artifact differ from the checked-in source and treats the symptom rather than fixing the release process.

So I would separate these two questions:

Should this project keep the chart version aligned with the application version?
That is a valid project policy.
How should we prevent maintainers from forgetting to update the version?
CI should detect the inconsistency and fail the release.

Regardless of whether the two versions are aligned or independent, correctly maintaining the chart version is something we should do properly, rather than something we should avoid through packaging-time overrides.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll open an issue on HAMi in a few days to elaborate on the above points again.

Signed-off-by: Spencer Cai <jiahao.cai@dynamia.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants