Skip to content

[Helm] Version the chart from the release - #2020

Merged
yili-db merged 7 commits into
unitycatalog:mainfrom
shba24:stack/ep3-helm-release
Oct 27, 2026
Merged

yili-db merged 7 commits into
unitycatalog:mainfrom
shba24:stack/ep3-helm-release

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 chart has been version 0.0.1-pre.1 with app version main since May 2025. A default install therefore runs the main server image, a March 2026 development build, and there is no published chart: users clone the repository and install from the folder (#1058, #1025).

This PR makes the chart releasable:

  • Published name: the chart is named unitycatalog-chart, to be published at oci://registry-1.docker.io/unitycatalog/unitycatalog-chart. Docker Hub stores a chart in a repository named after the chart, and unitycatalog/unitycatalog already holds the server image.
  • Versions from the release: Chart.yaml keeps placeholder versions. helm/package-chart.sh X.Y.Z packages chart X.Y.Z with app version vX.Y.Z, so a release chart runs that release's server image by default. It rejects a version with a leading v, which would point at a vvX.Y.Z image.
  • UI version: the UI image keeps the chart's default tag, the app version. Chart X.Y.Z runs unitycatalog/unitycatalog:vX.Y.Z and unitycatalog/unitycatalog-ui:vX.Y.Z, and each release publishes both.
  • README: install from the OCI registry, which needs Helm 3.8 or later.
  • Package contents: .helmignore excludes *.sh, so package-chart.sh and generate-docs.sh don't ship in the published chart. The README drops the version badges, which showed the 0.0.0-dev and main placeholders in a released chart.
  • CI: the workflow packages the chart with the same script and installs that package. Both image tags come only from the version the script stamps.
  • Pinned helper images: the Alpine and busybox helper images move from latest to alpine:3.24.2 and busybox:1.37.0, pinned by digest, so every install of a release runs the same images. Each release updates them to the latest stable release (step in [Docs] Add a Helm deployment guide and the chart release steps #2021's RELEASING.md).

User impact. The published chart is named unitycatalog-chart, but resource names don't change: the name helpers fall back to unitycatalog, the chart's old name, instead of the chart name. Release unitycatalog still creates unitycatalog-server, so an install from a cloned folder upgrades in place and keeps its database volume and signing key, with no nameOverride. The default is in the helpers rather than values.yaml, so a helm upgrade --reuse-values keeps it too. I checked with helm template that main's chart and this one give the same resource names, apart from the new test pod.

Before the first release. Docker Hub has only unitycatalog-ui:main (May 2025, which predates bun), which the chart starts with yarn (#2019). Each release publishes unitycatalog-ui:vX.Y.Z, built with bun (steps in #2021); 0.8.0 is the first.

Tests: on kind, the chart packaged by package-chart.sh 0.0.0-ci ran unitycatalog:v0.0.0-ci (built from source) and unitycatalog-ui:v0.0.0-ci with no tag override, and helm test passed. CI installs that package with the chart's default values, so the UI runs too. package-chart.sh rejects v0.8.0, 0.8 and foo, and accepts 0.8.0, 0.8.0-rc0 and 0.0.0-ci.

📐 Design notes & details

Why placeholders instead of keeping Chart.yaml in sync with version.sbt. The release version passed to the script is the only source, so there's no second file to keep in sync and nothing to compare. The Unity Catalog images rendered after packaging 0.7.0:

unitycatalog/unitycatalog:v0.7.0
unitycatalog/unitycatalog-ui:v0.7.0

Why chart version = Unity Catalog version. A user who asks for chart 0.8.1 expects server 0.8.1. The cost is that a chart-only fix ships with the next release.

Why the UI uses the server's version. Releases are published by hand. A separate UI version would add a decision and a pin bump to every release, and CI couldn't test a pinned tag before it was published. Rebuilding an unchanged UI image for a release takes a few minutes.

Why not a separate Docker Hub namespace for charts (for example unitycatalogcharts/unitycatalog):

  • Docker Hub namespaces allow only lowercase letters and digits, and repositories can't be nested.
  • The unitycatalog organization's open-source program benefits apply per organization, and a new organization would start without them.

CI step. Both images are loaded into kind only as unitycatalog:v0.0.0-ci and unitycatalog-ui:v0.0.0-ci, with pullPolicy: Never. If the stamping broke (for example, the app version stayed main), the pods couldn't start and the install would fail.

Pinned helper images. The chart's helper images used latest, so CI and every install could pull different bytes from one run to the next. Tags move too: busybox:1.37.0 was rebuilt under the same tag on 2026-09-23. They are now pinned by digest: alpine:3.24.2@sha256:294b… for the config init container and the create-users job, and busybox:1.37.0@sha256:bdf5… for the UI init container. The config init container still runs apk add at start (signed packages; versions follow Alpine 3.24); building those tools into an image is a separate change (#1019). The security review of the CI build is in #2019.

Measured with auth on (kind, auth.users set): the create-users job ran on the pinned Alpine, created [email protected] and granted CREATE CATALOG. GET /api/2.1/unity-catalog/catalogs returned 401 without a token and 401 with a forged token.

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-release branch 2 times, most recently from 5f49a13 to 25105cf Compare October 19, 2026 17:11
@shba24 shba24 changed the title [Helm] Version the chart from the release and pin the UI image [Helm] Version the chart from the release Oct 19, 2026
@shba24
shba24 force-pushed the stack/ep3-helm-release branch 5 times, most recently from 2524e7c to ecd12fb Compare October 19, 2026 22:30
@shba24
shba24 marked this pull request as ready for review October 19, 2026 23:34
@shba24
shba24 requested review from dennyglee and tdas as code owners October 19, 2026 23:34
@shba24
shba24 force-pushed the stack/ep3-helm-release branch 3 times, most recently from 623b4ee to 742f339 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).

Comment thread helm/README.md Resolved
Comment thread helm/README.md.gotmpl Resolved

@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.

I have two questions, but I don't see a reason for this not to ship. :shipit:

@shba24
shba24 force-pushed the stack/ep3-helm-release branch from 742f339 to 35253d9 Compare October 22, 2026 18:14
@shba24
shba24 force-pushed the stack/ep3-helm-release branch from 35253d9 to 60e3f96 Compare October 26, 2026 17:03
@shba24
shba24 requested a review from yili-db as a code owner October 26, 2026 17:03
@shba24
shba24 force-pushed the stack/ep3-helm-release branch 2 times, most recently from 459392f to eed9f45 Compare October 26, 2026 23:26
@yili-db
yili-db requested a review from roeap October 26, 2026 23:49

@yili-db yili-db 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.

[AI Assisted] Reviewed the stacked range 9090e88..eed9f45. The stamping design looks good: the version passed to package-chart.sh is the only source, and CI installs the packaged chart with no tag override, so broken stamping fails the install. Two inline comments, plus one on the description:

The Tests section is stale since #2019 changed: it says "A default install of the same package ran only the server, and helm test checked the server API", but #2019 now keeps the UI on by default. The "User impact" section would also change if the naming comment below is addressed.

Comment thread helm/Chart.yaml Resolved
Comment thread helm/values.yaml Resolved
@shba24

shba24 commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

Updated the description: the Tests section now says CI installs the package with default values (UI on, since #2019 keeps it on), and "User impact" reflects the kept resource names.

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]>
@yili-db

yili-db commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

/review

@shba24
shba24 force-pushed the stack/ep3-helm-release branch from 573a422 to acee12f Compare October 27, 2026 01:07
Comment thread helm/templates/_helpers.tpl Resolved
@yili-db

yili-db commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

/review

Comment thread .github/workflows/helm-chart-tests.yml Resolved
Comment thread helm/values.yaml Resolved
@shba24

shba24 commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

/review

@shba24
shba24 requested a review from yili-db October 27, 2026 06:35
@shba24

shba24 commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

/review

@shba24

shba24 commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

/review

shba24 and others added 7 commits October 27, 2026 07:35
The chart has been 0.0.1-pre.1 with appVersion `main` since May 2025, so a
default install runs a development image, and there is no published chart
to install without cloning the repository.

- Publish the chart as `unitycatalog-chart` (Docker Hub repo names come from
  the chart name, and `unitycatalog/unitycatalog` is the server image).
- Keep placeholder versions in Chart.yaml. `helm/package-chart.sh X.Y.Z`
  stamps chart version X.Y.Z and appVersion vX.Y.Z, so a release chart
  runs that release's server image. It rejects a version with a leading v.
- The UI image keeps defaulting to the app version, so chart X.Y.Z runs
  server and UI images vX.Y.Z, and each release publishes both.
- Turn the UI off by default: it runs a development server, so it's
  opt-in with `ui.enabled=true`. CI turns it on to keep testing it.
- Pin the helper images by digest (alpine 3.24.2 for the config init
  container and the create-users job, busybox 1.37.0 for the UI init
  container) instead of `latest`.
- Document installing from the OCI registry (needs Helm 3.8+).
- CI packages the chart with the same script and installs that package,
  with both image tags taken only from the stamped version.

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

.helmignore now excludes *.sh, so package-chart.sh and generate-docs.sh no longer ship inside the
published chart. The README install example uses X.Y.Z instead of a fixed release.

Co-authored-by: Isaac <[email protected]>
Signed-off-by: Shubham Bansal <[email protected]>
package-chart.sh stamps Chart.yaml but packages the README as generated, so a released chart's
README showed the 0.0.0-dev and main placeholder badges. helm show chart gives the real versions.

Co-authored-by: Isaac <[email protected]>
Signed-off-by: Shubham Bansal <[email protected]>
The helpers fall back to "unitycatalog", the chart's old name, instead
of .Chart.Name, so resources keep the names they had before the chart was
renamed unitycatalog-chart, and an upgrade needs no nameOverride. The
default is in the helper, so --reuse-values upgrades keep it too.

Co-authored-by: Isaac <[email protected]>
Signed-off-by: Shubham Bansal <[email protected]>
unitycatalog.fullname now uses unitycatalog.name, so "unitycatalog" is set in
one place, and the helper comments state the rule. CI renders the packaged chart
as release unitycatalog and fails if the server, PVC, signing key Secret or UI
names change. The nameOverride default shows as unitycatalog in the README.

Co-authored-by: Isaac <[email protected]>
Signed-off-by: Shubham Bansal <[email protected]>
unitycatalog.name now returns nameOverride as set, as fullname used before, so
an override ending in "-" (release uc, nameOverride uc-) keeps its resource
names. fullname still truncates the final name.

Co-authored-by: Isaac <[email protected]>
Signed-off-by: Shubham Bansal <[email protected]>
@shba24
shba24 force-pushed the stack/ep3-helm-release branch from 7087251 to 22d5742 Compare October 27, 2026 07:35
@yili-db
yili-db merged commit 0434491 into unitycatalog:main Oct 27, 2026
17 checks passed
yili-db pushed a commit that referenced this pull request Nov 4, 2026
…#2063)

**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!
- [x] If you've added or modified a feature, documentation in `docs` is
updated

**Description of changes**

The server's health endpoints (`/livez`, `/readyz`) are only served when
it starts with `--obs-port`, and the chart had no way to pass it. The
chart's probes only checked that the API port accepted a TCP connection,
so a pod could receive traffic while the server couldn't reach its
database.

This PR:
- adds `server.deployment.obsPort`. It is unset by default, like the
server's `--obs-port` flag. When set, the server starts with
`--obs-port` on that port, and the readiness and liveness probes, when
turned on, check `/readyz` and `/livez`;
- passes `server.deployment.port` to the server as `--port`. The chart
used it only for the container port, so with any value other than 8080
the server kept listening on 8080 and the pod failed its startup probe;
- adds `server.deployment.command`, defaulting to
`./bin/start-uc-server`. Kubernetes runs it instead of the image's
`ENTRYPOINT`, so an image that starts through its own wrapper can set
it;
- makes the create-users job call the server on `server.service.port`.
It reached the server through the Service but used
`server.deployment.port`, which only worked while both were 8080;
- keeps the readiness and liveness probes off by default, as before.
Without `obsPort` they check the API port, as they already did;
- fixes custom `livenessProbe`, `readinessProbe` and `startupProbe`
values (server and UI). Until now they rendered the whole chart context
instead of the probe;
- adds a CI step that renders non-default values, and installs the chart
in CI with `obsPort=8090` and the readiness probe on, so the kind test
exercises `/readyz`.

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

**Why `obsPort` is optional.** The observability endpoints are off
unless the server is given `--obs-port`, and the chart follows that. It
also keeps a chart installed from a source checkout working: its default
image tag `main` points to a Docker Hub image older than v0.7.0, which
rejects `--obs-port`. A `helm upgrade --reuse-values` from a release
without the value also keeps working, with observability off.

**Example.**

```yaml
server:
  deployment:
    obsPort: 8090
    enableReadinessProbe: true
```

This renders `command: ./bin/start-uc-server` with `args: --port "8080"
--obs-port "8090"`, an `obs` container port, and a readiness probe on
`/readyz` (period 10s, `failureThreshold: 3`). The startup probe already
covers slow starts, so readiness can react within about 30s when the
database becomes unreachable. Without `obsPort`, the probes keep their
earlier TCP checks and timings.

**Compatibility.**
- With default values, the server container now gets `command:
./bin/start-uc-server` and `args: --port "8080"`. That is the image's
own `CMD` plus its default port, so it starts the same way. Because a
pod's `command` replaces the image's `ENTRYPOINT`, an image with its own
`ENTRYPOINT` wrapper should set `server.deployment.command` to it. When
the value is null or empty, as after a `helm upgrade --reuse-values`
from a release made before it existed, the chart falls back to
`./bin/start-uc-server`.
- With `obsPort` set, the server image must be v0.7.0 or later.

**Network exposure.** The observability endpoints are unauthenticated,
and the server binds the port on all interfaces. The value's description
says that other pods can reach it on the pod IP, suggests a
NetworkPolicy, and notes that the kubelet must be allowed through for
the probes. The Service doesn't expose the port.

**Precedent.** Apache Polaris's chart runs a management port with health
and metrics endpoints, and its probes check it.

**Probe override fix.** The templates read `{{- if
.Values.server.deployment.readinessProbe }} readinessProbe: {{- toYaml .
}}`. `if` doesn't rebind `.`, so `toYaml .` dumped the whole render
context. They now use `with`, in all six places (server and UI).

**CI render step** (in `helm-chart-tests.yml`) checks:
- without `obsPort`: `--port` follows `port`, there is no `--obs-port`,
and the readiness probe, when on, checks the API port;
- with `obsPort=9099`: the `--obs-port` arg, the `containerPort`, and
`/readyz` and `/livez` probes on port `obs`;
- `obsPort` equal to `port` fails the render with the guard's message;
- the default `command` is `./bin/start-uc-server`,
`server.deployment.command` replaces it, and a null value falls back to
the default;
- the create-users job uses the Service port when `port` differs from
it;
- all six custom probes (server and UI) render as given, with no
`Capabilities`, `Release` or `Values` keys;
- `terminationGracePeriodSeconds: 0` is kept (#2060).

I ran it locally with Helm 3.20.0. It passes on this chart and fails
when each bug is put back: an always-on `--obs-port`, no `--port` or
`--port` only with `obsPort`, no `obsPort` guard, a default probe on
`api`, `if` instead of `with` in any of the six probes, a hard-coded
`command`, the job on `server.deployment.port`, or `with` for the grace
period.

**Docs and validation.** `docs/server/helm.md` gets a short Health
checks section, which notes the v0.7.0 requirement. The chart fails at
render if `obsPort` equals `port`, since the server would refuse to
start.

**Other checks.**
- `helm lint` passes.
- `helm/README.md` was regenerated with helm-docs v1.14.2.
- The v0.7.0 server image started with `--obs-port 8090` answers
`/readyz` and `/livez` with 200 on 8090, and `/readyz` with 404 on the
API port.

**Not changed here.** The `nameOverride` row in `helm/README.md` shows
`null`: that is what helm-docs v1.14.2 renders for the annotation from
#2020, and CI's README freshness check passes.

</details>

This pull request and its description were written by Isaac.

---------

Signed-off-by: Shubham Bansal <[email protected]>
Co-authored-by: Isaac <[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