Skip to content

[Docs] Add a Helm deployment guide and the chart release steps - #2021

Merged
yili-db merged 16 commits into
unitycatalog:mainfrom
shba24:stack/ep3-helm-docs
Oct 29, 2026
Merged

yili-db merged 16 commits into
unitycatalog:mainfrom
shba24:stack/ep3-helm-docs

Conversation

@shba24

@shba24 shba24 commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

🥞 Stacked PR

Use this link to review incremental changes.


Description of changes

The deployment page covers only the tarball, and there are no steps for publishing the chart.

This PR adds:

  • docs/server/helm.md (in the docs nav, linked from the deployment page). It covers installing the chart from the OCI registry, opening the API and the UI, running helm test, switching to PostgreSQL, and upgrading and uninstalling. With authentication on, the PostgreSQL section says to set server.authorization.policy-refresh, because replicas share the database and even one replica runs next to its replacement during a rolling update.
  • helm/RELEASING.md, the maintainer steps for each release:
    1. Publish the server and UI images, both tagged with the release version, before the chart, patch releases included.
    2. Update the digest-pinned Alpine and busybox helper images to their latest stable release.
    3. Package the chart with helm/package-chart.sh and push it to Docker Hub.
    4. Check that every image the published chart runs exists, including the UI image.

Publishing stays manual, as it is for the images today, and only the release managers (@tdas, @yili-db) push to the unitycatalog Docker Hub organization. Their write access is set up in Docker Hub (see the setup steps below).

Tests: mkdocs build --strict and markdownlint pass. I rehearsed every RELEASING.md step against a local registry standing in for Docker Hub (details below): the chart installed from the registry, ran both images at the stamped version, and passed helm test, and the image check caught a release with the UI image missing. I also ran the check against Docker Hub on a chart stamped 0.4.0: it found unitycatalog:v0.4.0 and reported Missing: unitycatalog/unitycatalog-ui:v0.4.0, in bash and zsh.

📐 Design notes & details

Scope. This is an install guide for the chart, not the full production guide (#87). Topology and sizing aren't covered.

Verified claims in the guide:

  • The service names for release unitycatalog come from helm template.
  • H2 supports only one server: the file database sits on a ReadWriteOnce claim, and a single replica uses the Recreate strategy.
  • helm uninstall keeps the database claim and the token signing key Secret: both use helm.sh/resource-policy: keep, and a later install reuses them.
  • Ingress and HTTPRoute send /api to the server and everything else to the UI.

UI access. By default, the UI proxies the API, and its dev server then checks the Host header (see #753). Measured on kind, through a port-forward:

Host sent UI proxies the API (default) Proxy off (Ingress or HTTPRoute)
localhost:3000, 127.0.0.1:3000, the Service IP page page
the Service name, uc.example.com Invalid Host header page

So the guide uses kubectl port-forward for the default mode, and Ingress or HTTPRoute for a hostname.

Why the verify snippet reads line by line. On macOS, xargs doesn't run the command for empty input, so piping to it would print success when helm template failed, for example with a wrong version. zsh, the macOS default shell, doesn't split an unquoted variable into words, so for image in $images would check one multi-line string. A while read loop works the same in bash and zsh; I ran the snippet in both. The check runs Helm with empty Helm and Docker credential files, so it fetches the chart logged out and catches a chart that was pushed as private. Only helm template gets the empty files: DOCKER_CONFIG also sets where Docker looks for CLI plugins, so an empty one would hide a per-user buildx and report every image as missing. The images are inspected with your usual Docker setup. helm registry logout alone isn't enough: against a stub registry, Helm sent the saved credentials from either file, and sent none only when both were empty. With both empty, an anonymous pull of a public chart from Docker Hub worked.

Release rehearsal. I ran the RELEASING.md steps on this branch, with a local registry:2 at localhost:5001 in place of registry-1.docker.io and a kind cluster pulling from it:

  1. Built the server image from source and pushed it with the UI image as localhost:5001/unitycatalog/unitycatalog:v0.8.0-rc0 and .../unitycatalog-ui:v0.8.0-rc0.
  2. helm/package-chart.sh 0.8.0-rc0, then helm push --plain-http unitycatalog-chart-0.8.0-rc0.tgz oci://localhost:5001/unitycatalog. helm show chart read back version 0.8.0-rc0 and app version v0.8.0-rc0.
  3. helm install from oci://localhost:5001/unitycatalog/unitycatalog-chart --version 0.8.0-rc0, overriding only the image repositories. The pods pulled both images from the registry at v0.8.0-rc0, and helm test --logs passed.
  4. The image check, in bash and zsh: "All images exist" for 0.8.0-rc0, and Missing: localhost:5001/unitycatalog/unitycatalog-ui:v0.8.0-rc1 for a chart 0.8.0-rc1 whose UI image wasn't pushed.

Not covered by the rehearsal: the Docker Hub login, public visibility on Docker Hub (the check runs logged out to catch a private chart), and the multi-platform build. On the default docker builder, the build command fails with "Multi-platform build is not supported", which is why RELEASING.md says to run docker buildx create --use.

Docker Hub setup before the first release. Push access lives in the unitycatalog Docker Hub organization, not this repository. An organization Owner needs to:

  1. Create unitycatalog/unitycatalog-chart as a public repository, so helm install works without a login.
  2. Give @tdas and @yili-db write (publish) access to unitycatalog/unitycatalog, unitycatalog/unitycatalog-ui and unitycatalog/unitycatalog-chart, either as Owners or through a team with Read & Write on those three repositories. No one else needs write access.

They log in with a Docker Hub personal access token (docker login, helm registry login registry-1.docker.io). No GitHub secrets are involved.

Security review: Docker Hub credentials in GitHub. secrets.DOCKERHUB_USERNAME and secrets.DOCKERHUB_TOKEN appear only in disabled_docker-build.yml and disabled_ui-docker-build.yml, and every job in those files is if: false. No active workflow reads them, including this stack's. I can't see whether the secrets still exist: only repository and organization admins can list secrets. If they do exist as repository secrets, anyone with write access can read them by pushing a workflow to a branch of this repository, so more people than the release managers could push to Docker Hub. Pull requests from forks can't read them. An admin should check and delete them: publishing is manual, so nothing needs them.

Optional: immutable release tags. Docker Hub can make tags immutable per repository. With a rule such as v.* on unitycatalog/unitycatalog and unitycatalog/unitycatalog-ui, a pushed vX.Y.Z can never be replaced, so the tag pins the image the chart runs.

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added or modified a feature, documentation in docs is updated

This pull request and its description were written by Isaac.

@shba24
shba24 force-pushed the stack/ep3-helm-docs branch 7 times, most recently from 9794b66 to 38f9331 Compare October 19, 2026 22:30
@shba24
shba24 marked this pull request as ready for review October 19, 2026 23:34
@shba24
shba24 force-pushed the stack/ep3-helm-docs branch 3 times, most recently from dfed8d0 to 51684ad Compare October 20, 2026 02:59
@shba24

shba24 commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

AI review, run locally on the whole stack (#2019 → #2020 → #2021)

I ran this repository's AI reviewer locally: the six roles in .github/omnigent/reviewer (domain, two maintainer passes, architecture, test coverage, docs), then the disprove gate over their combined findings. The reviewers checked their claims with helm template, helm lint, ct lint, helm package and helm-docs.

Known and left as is: until a release publishes unitycatalog-ui:vX.Y.Z, an install from a checkout with ui.enabled=true runs the old :main UI image and can't start the UI (see #2020's description).

@shba24
shba24 force-pushed the stack/ep3-helm-docs branch from 51684ad to 0c49554 Compare October 22, 2026 18:14

@newfront newfront left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is great. I see the releasing overview now. I love it.

@shba24
shba24 force-pushed the stack/ep3-helm-docs branch 4 times, most recently from 02d88d6 to 9e61f85 Compare October 27, 2026 00:04
yili-db pushed a commit that referenced this pull request Oct 27, 2026
## 🥞 Stacked PR
Use this
[link](https://github.com/unitycatalog/unitycatalog/pull/2019/files) to
review incremental changes.
-
[**stack/ep3-helm-ci**](#2019)
[[Files
changed](https://github.com/unitycatalog/unitycatalog/pull/2019/files)]
← _this PR_
-
[stack/ep3-helm-release](#2020)
[[Files
changed](https://github.com/unitycatalog/unitycatalog/pull/2020/files/9090e88439087610b7240d3dd89c8464e6ac83d9..573a422bfdfcc8aa1e144e1a8d28c19879ed5b14)]
-
[stack/ep3-helm-docs](#2021)
[[Files
changed](https://github.com/unitycatalog/unitycatalog/pull/2021/files/573a422bfdfcc8aa1e144e1a8d28c19879ed5b14..936a12fac01b260d4d3fa97706943c076c8ac757)]

---------
**Description of changes**

The UI moved from yarn to bun in #1732, but the Helm chart still starts
it with `yarn start`. Yarn 1 refuses to run in a project whose
`package.json` declares `packageManager: bun@…`. So with any UI image
built from today's `ui/`, the UI pod crash-loops and `helm install
--wait` times out.

This PR:

- starts the UI with `bun run start` when the image has bun, and with
`yarn start` otherwise. The UI stays on by default, as on main;
- adds a `helm test` hook that checks the server API, the UI page and
the UI's `/api` proxy. Its image is set by `test.image` (with
`test.imagePullSecrets`), so a mirrored registry can run it;
- adds a **Helm Chart Tests** workflow for pull requests that touch
`helm/`, `ui/` or the `Dockerfile`. It checks that the chart README is
current (helm-docs), runs `ct lint`, installs the chart on kind with
server and UI images built from the PR, and runs `helm test`;
- regenerates the chart README, which was missing the values added in
#1689 and #1690, and fixes two yamllint errors in `values.yaml`. The
yamllint fixes are whitespace only, and the parsed values are identical.

UI images built from today's `ui/` now start with bun. The published
`unitycatalog-ui:main` image (May 2025) predates bun and has only yarn,
so it keeps starting with yarn, and a default install or `helm upgrade`
from main keeps its UI. bun is checked first, because a bun image also
has yarn (from `node:18`), but yarn refuses to run there. Once each
release publishes a bun-based UI image (#2020, #2021), the yarn branch
can go.

**Tests:** on a local kind cluster, the unchanged chart crash-loops the
UI as described above. With this PR, the install is ready in about 30
seconds and `helm test` passes. CI installs the chart with its default
values, with server and UI images built from the PR. This stack changes
no JVM code, and the full `build/sbt test` suite passes locally.

<details><summary><b>📐 Design notes &amp; details</b></summary>

**Repro of the bug** (kind with Kubernetes 1.32, server image `v0.7.0`,
UI image built from `main`):

```
error This project's package.json defines "packageManager": "yarn@[email protected]". However the current global version of Yarn is 1.22.22.
```

With `bun run start`, the following all returned 200 through a
port-forward: the UI page, the server API, a read through the UI's
`/api` proxy, and creating and deleting a catalog and a schema through
that proxy.

**Why this workflow builds Docker images.** #1420 disabled the image
*publishing* workflows to protect their Docker Hub secrets. This
workflow builds images only to load them into a throwaway kind cluster:

- it pushes nothing and uses no secrets;
- `permissions: contents: read` and `persist-credentials: false`;
- it runs on `pull_request`, not `pull_request_target`;
- actions are pinned to commit SHAs and the helm-docs image to a digest;
- zizmor reports no findings for it.

**What the test checks.**

- The UI dev server enables its host check whenever it proxies the API.
In that mode it accepts `localhost`, `*.localhost` and IP addresses, and
rejects other hostnames such as the Service name (see #753). The test
sends `Host: localhost`, as a browser on `kubectl port-forward` does.
Ingress and HTTPRoute mode turn the proxy off, and the test then skips
the proxy check.
- With `auth.enabled`, the test has no token, so it checks only the UI
page. With auth on and the UI off, there is nothing to check, and no
test pod is rendered.
- A failed check prints which check failed, and CI runs `helm test
--logs` so the output reaches the job log. The test pod is kept after it
passes and replaced on the next run, because `--logs` reads it after the
test finishes.
- The test checks that the UI is served, not that the UI compiles: the
dev server serves `index.html` even after a compile error.
- Ingress and HTTPRoute installs aren't exercised, because they need a
controller in kind.

**Local limits.** This machine can't build the server image from source
(old Docker and kernel), so locally I ran the same steps with the
released `v0.7.0` server image. The first from-source build in this
workflow is this PR's CI run.

Tools: Helm 3.20.0, chart-testing-action 2.9.0 (ct 3.15.0), kind-action
1.15.1, helm-docs 1.14.2.

**Measured results** (kind, chart from this PR, UI on, images built from
the PR):

| Request | Status |
|---|---|
| server `GET /api/2.1/unity-catalog/catalogs` | 200 |
| UI `GET /` with `Host: localhost:3000` | 200, UI page |
| UI `GET /` with `Host: uc.example.com` | 200, but the body is `Invalid
Host header` (the dev server's rejection page, see #753) |
| through the UI: `GET /api/2.1/unity-catalog/catalogs` | 200 |
| through the UI: `POST /catalogs {"name": "ep3"}` | 200 |
| through the UI: the same `POST` again | 400 (already exists) |
| through the UI: `GET /catalogs/missing` | 404 |
| through the UI: `DELETE /catalogs/ep3` | 200 |
| unchanged chart (`yarn start`) | UI pod in CrashLoopBackOff; `helm
install --wait` times out |

**Security review: building images in CI again.** #1420 turned off the
workflows that built and pushed images, because they held Docker Hub
secrets. This workflow builds images again, for testing only. I reviewed
it, and also ran GLM 5.3 and Claude Opus reviews; every point below was
checked against the files, the actions at their pinned commits, and a CI
run.

*If a container in this job is compromised:*

| Where the bad code runs | What it can do |
|---|---|
| inside `docker build` (a base image, or an npm, Maven, apk or apt
package) | change the image under test; it gets no token and no secret |
| inside a kind pod (a chart helper image) | the same, unless it escapes
the pod |
| on the runner (helm, uv, ct, kind, helm-docs, or an escape from the
privileged kind node) | control this job: a read-only `GITHUB_TOKEN`, no
secrets, no way to push images, charts or code; it can make the test
pass or fail wrongly |

The one way out of the job was the GitHub Actions cache. A job running
on `main` writes caches that other workflows on `main` restore,
including the sbt and bun caches and `ai-review.yml`, which holds
secrets. So the workflow runs **only on pull requests**: a pull
request's caches are scoped to that pull request, and `main` never reads
them. A tampered helm-docs image could edit chart files before the
install, so the check now fails on any change under `helm/`, not only
`README.md`.

*Docker Hub credentials:* this workflow can't reach them under any
trigger. GitHub gives a job only the secrets it names, and this workflow
names none; pull requests from forks get no secrets at all. Before
anyone turns the old image workflows back on: they log in to Docker Hub
and use the `type=gha` build cache in the same job, so a poisoned cache
could reach the published images.

*Pinned inputs:* actions by commit SHA (`actions/checkout` at v7.0.1);
helm-docs, the Dockerfiles' base images and syntax frontend, the `helm
test` image and the kind node image
(`kindest/node:v1.37.0@sha256:a1ed…`) by digest; kind v0.33.0, kubectl
v1.37.1, helm v3.20.0 and uv 0.13.1 by version; the UI's npm packages by
`bun.lock`. The chart's other helper images still use `latest` here;
#2020 pins them. Not pinned, and pre-existing: `apk add bash` and
`apt-get install jq` during the image builds and `apk add` in the config
init container (signed packages, but versions move), and sbt's Maven
downloads and launcher jar (no hash lock).

*Follow-ups (not in this stack):* zizmor checks for all workflows.
Separately, the existing cache exposure this workflow avoids stays as it
is: `unit-tests.yml`, `lint-check.yml` and `cross-spark-build.yml` write
caches on `main`, and `ai-review.yml` restores caches while holding
secrets. zizmor's cache-poisoning audit doesn't flag the `ai-review.yml`
case (0 findings when run on it).

</details>

**PR Checklist**

- [x] A description of the changes is added to the description of this
PR.
- [ ] If there is a related issue, make sure it is linked to this PR.
- [x] If you've fixed a bug or added code that should be tested, add
tests!
- [ ] If you've added or modified a feature, documentation in `docs` is
updated

This pull request and its description were written by Isaac.

---------

Signed-off-by: Shubham Bansal <[email protected]>
Co-authored-by: Isaac <[email protected]>
@shba24
shba24 force-pushed the stack/ep3-helm-docs branch from 936a12f to 05c2f29 Compare October 27, 2026 01:07
@shba24
shba24 force-pushed the stack/ep3-helm-docs branch from 05c2f29 to dc24245 Compare October 27, 2026 07:35
@shba24

shba24 commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

/review

1 similar comment
@shba24

shba24 commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

/review

shba24 and others added 14 commits October 28, 2026 16:52
The deployment page covers only the tarball, and there are no steps for
publishing the chart.

- Add docs/server/helm.md: install from the OCI registry, open the API and
  the optional UI, use PostgreSQL, upgrade and uninstall. Link it from the
  deployment page and the docs nav.
- Add helm/RELEASING.md: publish the server and UI images with the
  release version before the chart, package with helm/package-chart.sh,
  push to Docker Hub, and check that every image the published chart runs
  exists. Only the release managers can push to the Docker Hub
  organization.

Co-authored-by: Isaac <[email protected]>
Signed-off-by: Shubham Bansal <[email protected]>
The release check now renders the chart with the UI on, so it also checks the UI image. The
upgrade guide tells source-checkout installs to set nameOverride: unitycatalog, which keeps the
old resource names after the chart rename, and ui.enabled: true to keep the UI.

Co-authored-by: Isaac <[email protected]>
Signed-off-by: Shubham Bansal <[email protected]>
…efresh

The release check now runs Helm with empty Helm and Docker credential files. helm registry logout
alone left the docker login credentials in use, so a private chart could pass the check. The guide
uses X.Y.Z instead of a fixed release, and says that several replicas with authentication on need
server.authorization.policy-refresh.

Co-authored-by: Isaac <[email protected]>
Signed-off-by: Shubham Bansal <[email protected]>
With PostgreSQL the chart does a rolling update, so even one replica runs next to its
replacement during an upgrade; the guide now asks for policy refresh whenever authentication is
on with PostgreSQL. RELEASING.md states who pushes to Docker Hub as a rule, since the access is
granted outside the repository.

Co-authored-by: Isaac <[email protected]>
Signed-off-by: Shubham Bansal <[email protected]>
…images

The chart keeps its resource names, so the guide's port-forward commands
use them and the upgrade section no longer needs nameOverride. Releasing
now checks the digest-pinned helper images for newer patch releases.

Co-authored-by: Isaac <[email protected]>
Signed-off-by: Shubham Bansal <[email protected]>
…irements, link the versioned chart docs

Co-authored-by: Isaac <[email protected]>
Signed-off-by: Shubham Bansal <[email protected]>
@shba24
shba24 force-pushed the stack/ep3-helm-docs branch from 1154260 to c4ca1cd Compare October 28, 2026 16:55
@yili-db

yili-db commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

/review

Comment thread helm/RELEASING.md Resolved
…upgrades and hostnames

Exporting an empty DOCKER_CONFIG also hid a per-user docker buildx plugin, so every image read as missing. The empty credential files now apply only to helm template, which fetches the chart; the images are inspected with the usual Docker setup.

Also: say why a floating tag such as alpine:3 is wrong (it can move to a newer release), show the policy-refresh setting as YAML, pass the same --values file on upgrade, and note that the API needs a bearer token with authentication on and that ingress and httpRoute need a host and turn off the UI's API forwarding.

Co-authored-by: Isaac <[email protected]>
Signed-off-by: Shubham Bansal <[email protected]>
@shba24
shba24 requested a review from yili-db October 29, 2026 22:12
@yili-db

yili-db commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

/review

Comment thread docs/server/helm.md Resolved
… on helm upgrade

Without --values or --set, helm upgrade reuses the previous release's values. The trap
is the other way: once any --values or --set is passed, earlier values that are not
passed again go back to the chart defaults.

Co-authored-by: Isaac <[email protected]>
Signed-off-by: Shubham Bansal <[email protected]>
shba24 added a commit to shba24/unitycatalog that referenced this pull request Oct 29, 2026
…nto stack/ep3-helm-graceful-shutdown

Co-authored-by: Isaac <[email protected]>
@yili-db

yili-db commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

/review

@yili-db
yili-db merged commit c1fb09d into unitycatalog:main Oct 29, 2026
19 checks passed
shba24 added a commit to shba24/unitycatalog that referenced this pull request Oct 29, 2026
Main squashed unitycatalog#2021, which this branch already contains; keep this branch's version of the file both sides changed.

Co-authored-by: Isaac <[email protected]>
Signed-off-by: Shubham Bansal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants