Skip to content

feat(helm): publish the chart to GHCR and add Docker and Kubernetes docs - #3554

Merged
inureyes merged 5 commits into
mainfrom
feature/issue-3487-chart-oci-docs
Nov 29, 2026
Merged

inureyes merged 5 commits into
mainfrom
feature/issue-3487-chart-oci-docs

Conversation

@inureyes

@inureyes inureyes commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Summary

Publishes the Helm chart from the release workflow and adds the Docker and Kubernetes user guides, the last unit of epic #3488.

  • publish-chart in release.yml runs after publish-images succeeded and actually pushed images for the tag (new published job output), skips tags whose tree has no chart or packaging script, packages charts/mlxcel with version and appVersion set to the tag without v, pushes to oci://ghcr.io/lablup/charts/mlxcel, logs Docker in to GHCR only after the push (the attestation reads ~/.docker/config.json; the tag tree's script never runs with it), attests the pushed digest, and reads the chart back from the registry. Actions are SHA-pinned; packages: write, id-token: write and attestations: write are job-scoped.
  • Deviation from the issue body: a release event does not fail on a stale Chart.yaml. The version is set at package time for every event, so the published chart's default image v<appVersion>-cuda13 is always one publish-images pushed. A notice records a mismatch with the tree.
  • scripts/ci/helm_chart_package.sh checks the packaged .tgz, not the tree: helm show chart version and appVersion, and every rendered image: against docker_image_tags.sh's runtime_tags. It also requires the chart name mlxcel, the push and attestation target. helm_chart_package_test.sh covers stable, prerelease and dispatch tags, rejected tags, and three packages that must fail; it runs in the helm-chart CI job. The run is recorded in docs/benchmark_results/helm-chart-oci-publish-2026-11-29.md.
  • docs/docker.md, docs/kubernetes.md and their .ko.md translations replace the container section of docs/installation.md (now a pointer) and are linked from README.md, docs/README.md and the chart README. They note that a stable-looking dispatch or an unpromoted release still publishes a chart that a bare helm install may pick although latest-cuda13 did not move.

Not done here: the issue's CLAUDE.md/AGENTS.md release-table row for Chart.yaml is left for the maintainer.

Changes during review

  • Implementation review: added the Docker login the attestation needs (it would have failed after the push), corrected the image account name and the kind version, and added the validation record.
  • Security review (no CRITICAL or HIGH): moved that login after the push, added the chart-name check, and documented the chart selection caveat, the 2775 bind mount's HF cache exposure and the public /webui files.

Test plan

  • actionlint (CI mode clean; default mode shows only the 9 findings already on main)
  • helm_chart_package_test.sh (16 cases) with Helm 3.22.1 and 4.3.2; docker_image_tags_test.sh
  • helm push to a local registry:2, then helm show chart, helm pull, helm template from it; prerelease-only helm pull without --version fails, --devel works
  • helm install from that registry on kind under restricted Pod Security: pod admitted with the release image in both containers (Pending, image not published)
  • check_helm_chart.py, check_env_var_docs.py, check_cross_repo_refs.py, link check of the changed pages

Not validated: a push to or pull from ghcr.io, the chart attestation, package visibility, any GPU pod on Kubernetes, any docker run of the published image, and any amd64 container run.

Closes #3487

@inureyes inureyes added status:review Under review type:enhancement New features, capabilities, or significant additions priority:medium Medium priority area:docs User and developer documentation platform:linux Linux (CUDA / packaging) specific labels Nov 29, 2026
@inureyes

Copy link
Copy Markdown
Member Author

Implementation Review Summary

Intent

Publish charts/mlxcel to oci://ghcr.io/lablup/charts/mlxcel from release.yml with version and appVersion set from the tag, prove the package agrees with the published image tag, and document the Docker image and the Helm chart.

Findings Addressed

  • The publish-chart attest step had no registry credentials: actions/attest reads only ~/.docker/config.json (sigstore-js getRegistryCredentials), and the job only ran helm registry login. Every release would have pushed the chart and then failed the job at attestation. Added the same SHA-pinned docker/login-action step publish-images uses (a948ee0). (HIGH)

Remaining Items

  • docs/docker.md and docker.ko.md line 92 call the uid 65532 account nonroot; the Dockerfile names it mlxcel in /etc/passwd and /etc/group. (MEDIUM, below the auto-fix threshold)
  • The kubernetes.md validation bullet on the local OCI registry round trip (Helm 3.22.1 and 4.3.2, prerelease helm pull behavior, helm install of the package on kind) is backed only by the PR body; docs/benchmark_results/helm-chart-kind-2026-11-29.md records Helm 4.3.2 and 3.16.4 and none of those steps. Add the run to a record or link the evidence. (MEDIUM)
  • kubernetes.md says "kind (v1.37)"; v1.37 is the Kubernetes version, kind is v0.33.0. (LOW)

Verification

  • All stated requirements implemented
  • No placeholder/mock code remaining
  • Integrated into project code flow
  • Project conventions followed
  • Existing modules reused where applicable
  • No unintended structural changes
  • Tests pass

Checked: helm_chart_package_test.sh passes with Helm 3.22.1; actionlint passes on release.yml and ci.yml; the setup-helm and attest SHAs resolve to v5.1.0 and the attest pin publish-images already uses; the workflow's digest sed extracts the digest from a real helm push to a throwaway local registry (Helm 3 prints it on stderr only, which the 2>&1 covers). Gating with a skipped promote-release works because both jobs use !cancelled(). The docs match Dockerfile.cuda, values.yaml and templates, server-features.md, environment-variables.md and both records apart from the items above, and the Korean pages match the English ones line for line (code spans, links, numbers, anchors). Not exercised: a push to ghcr.io and the attestation at run time.

@inureyes

Copy link
Copy Markdown
Member Author

Security and performance review

No CRITICAL or HIGH findings, so no fix commits. actionlint (CI shellcheck mode) and shellcheck are clean, and helm_chart_package_test.sh passes all 15 cases under Helm 3.22.1.

Checked and sound

  • The free-text release_tag reaches run: only through env (RELEASE_TAG), and it appears as an expression only in ref: and the concurrency group. publish-images has already validated it with the same regex and the 115-character cap in docker_image_tags.sh before publish-chart can run, and helm_chart_package.sh checks it again.
  • Permissions are job-scoped and match publish-images (contents: read, packages: write, id-token: write, attestations: write). The workflow default is {}, checkout uses persist-credentials: false, and helm registry login reads the token from stdin. Every action is SHA-pinned; azure/setup-helm@2f5e7bc matches the v5.1.0 tag. Helm is pinned to v3.22.1.
  • The package contains only Chart.yaml, values, schema, templates, README and .helmignore (ci/ is excluded). The default render is checked against runtime_tags, and a mismatch deletes the .tgz before the push.
  • The docs' security claims match the source: the public endpoints (app.rs is_public_endpoint, also used by the router), the HF cache probed before the store without an owner check (resolver.rs step 2b before 2c), and the trusted-root residuals as stated in environment-variables.md.

Remaining items (below the auto-fix threshold)

  • MEDIUM: Helm's implicit latest does not follow the image gating. A stable-named tag whose GitHub release stays an unpromoted prerelease (macOS build failed), or a dispatch for a stable tag, publishes chart X.Y.Z. If it is the highest semver, a bare helm install then picks it, even though latest-cuda13 did not move. Either gate stable chart versions on release plus full_release the way docker_image_tags.sh does, or document the difference next to "Always pass --version".
  • LOW: helm_chart_package.sh accepts any non-empty chart name, but the attest and read-back steps hardcode mlxcel. A renamed Chart.yaml would push to charts/<other> before the job fails. Assert chart_name == mlxcel.
  • LOW: docker/login-action runs before the step that executes the tag tree's scripts, so those scripts can read ~/.docker/config.json. Move the login to just before the push or attest steps.
  • LOW: A re-dispatch for an existing tag overwrites chart X.Y.Z with a new digest, which is consistent with the versioned image tags. The read-back reads by tag, not by the pushed digest.
  • LOW: actions/checkout with a bare ref: vX.Y.Z prefers a branch of the same name over the tag. publish-images shares this behavior, and only a writer can trigger it.
  • LOW (docs): The 2775 bind-mount row does not repeat the HF cache substitution caveat for host members of gid 65532, which the 0777 row has. With --webui, /webui static assets are also public, so "only /, /health and /v1/health" holds only without the WebUI.

@inureyes inureyes added status:done Completed and removed status:review Under review labels Nov 29, 2026
The release workflow pushed the CUDA images but not the chart, and nothing outside the source explained how to run either. A new publish-chart job runs after publish-images has pushed the versioned images for the same tag, packages charts/mlxcel with version and appVersion set to the tag without its leading v, and pushes it to oci://ghcr.io/lablup/charts/mlxcel with a build provenance attestation. Setting the version at package time for every event, instead of failing a release on a stale Chart.yaml, means the published chart's default image tag is always one that publish-images pushed.

scripts/ci/helm_chart_package.sh validates the tag with the image tag rule, packages the chart and checks the .tgz itself: helm show chart must report the version for both fields and every image line of a default render must equal docker_image_tags.sh's runtime_tags. helm_chart_package_test.sh covers stable, prerelease and dispatch tags, bad tags, and two packages that must be rejected, and runs in the helm-chart CI job.

docs/docker.md and docs/kubernetes.md, with Korean translations, take over the container section of docs/installation.md (now a pointer) and cover tags, host requirements, the cache layout and trust rules with their residuals, HF cache safety, health, shutdown, API keys, router mode, metrics, the OCI install, package visibility and what has not been validated.

Validated: actionlint, the packaging test with Helm 3.22.1 and 4.3.2, a push to a local registry:2 read back with helm show, pull and template, an install from it on kind under restricted Pod Security, check_helm_chart.py, env-var docs and cross-repo-ref checks, and a link check of the changed pages. Not validated: a push to ghcr.io, the attestation, and any GPU run.

Refs #3487
actions/attest pushes the attestation with credentials read from ~/.docker/config.json (sigstore-js getRegistryCredentials). The publish-chart job only ran `helm registry login`, which writes Helm's own registry config, so the attest step would fail with no credentials right after the chart push, leaving a published chart and a red job. Add the same SHA-pinned docker/login-action step publish-images uses.

actionlint (shellcheck at error severity) passes on release.yml.

Refs #3487
Adds docs/benchmark_results/helm-chart-oci-publish-2026-11-29.md for the packaging test, the local registry round trip and the restricted-PSS install from it on kind, which docs/kubernetes.md cited without a record, and indexes it. Names the image's uid 65532 account as mlxcel, as in docker/Dockerfile.cuda, and states the kind and Kubernetes versions separately.

Refs #3487
Addresses the security review of the chart publish job. The docker login that the attestation needs now runs after the push, so the tag tree's packaging script never runs with a token in ~/.docker/config.json. helm_chart_package.sh requires the chart name to be mlxcel, since the push target, attestation subject and read-back are all ghcr.io/lablup/charts/mlxcel; the test gains a renamed-chart case (16 cases, Helm 3.22.1 and 4.3.2).

Docs now say that a chart is published for any tag that published images, including a stable-looking dispatch or an unpromoted release that does not move latest-cuda13, so a bare helm install can pick it; that a 2775 bind mount lets every host member of gid 65532 write /cache with the HuggingFace cache risk; and that --webui adds public static /webui files.

Refs #3487
Removes commas after connective endings and replaces figurative predicates in docs/docker.ko.md and docs/kubernetes.ko.md with plain technical verbs (unload, run, report as allocatable). The OCI packaging record now lists 16 test cases, including the renamed-chart rejection added by the security review.

Refs #3487
@inureyes
inureyes force-pushed the feature/issue-3487-chart-oci-docs branch from adcde1a to 6620e9e Compare November 29, 2026 00:32
@inureyes
inureyes marked this pull request as ready for review November 29, 2026 00:32
@inureyes
inureyes merged commit 1c55de0 into main Nov 29, 2026
@inureyes
inureyes deleted the feature/issue-3487-chart-oci-docs branch November 29, 2026 00:32
inureyes added a commit that referenced this pull request Nov 29, 2026
Bring in the Chat workspace restructure (#3552) and the Helm chart publishing work (#3554) so the Settings rebuild for #3524 stays mergeable.

- Icons: the union of both sides, `forward` and `back` from Settings plus `add`, `parameters` and `privacy` from Chat; the icon count test now expects 30.
- Docs: design-system.md lists all 30 glyphs and keeps the Settings note on the re-exported `Icon`; both user guides keep the Settings rows and search paragraph and take Chat's wording that the history and privacy dialog opens from the shield button in Chat's header.
- Strings: the fixture merged cleanly to 1040 entries with no key edited on both sides, so `StringCatalog.strings.maxItems` in docs/webui/api.yaml rises from 1024 to 2048; the generated DTO has no drift.
- Bundled assets were regenerated with scripts/webui/build_bundle.py rather than hand-merged.

Validated with typecheck, lint, the unit suite (843 tests), the theme and agents checks, the bundle verify, the WebUI contract check, and the Chromium settings, chat and shell Playwright specs (39 passed).
inureyes added a commit that referenced this pull request Nov 30, 2026
Bilingual reports for the eight PRs of epic #3488: #3508 (graceful drain), #3509 (CUDA PTX cache trust), #3530 (ROCm hsaco cache trust), #3540 (NVRTC redistributable headers), #3543 (CUDA container image), #3549 (Helm chart), #3550 (GHCR image publishing) and #3554 (chart OCI publishing and docs).

Each report names what the PR record leaves unvalidated: a real GHCR push, a GPU pod on a cluster, the amd64 and debug images. The HuggingFace cache follow-up is #3570.
@inureyes inureyes added this to the 0.9 milestone Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs User and developer documentation platform:linux Linux (CUDA / packaging) specific priority:medium Medium priority status:done Completed type:enhancement New features, capabilities, or significant additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(helm): Publish the chart to GHCR and add Docker and Kubernetes docs

1 participant