Skip to content

The open-source agent harness - the runtime layer that turns an LLM into a working agent.

Update image publish & helm chart (#111)

Chirag Jained54b0fcb93f
diff --git a/.github/workflows/push-sandbox-image.yml b/.github/workflows/push-sandbox-image.yml
new file mode 100644
index 000000000..13ba3d4c4
--- /dev/null
+++ b/.github/workflows/push-sandbox-image.yml
@@ -0,0 +1,49 @@
+name: Push sandbox image
+
+# Build and push the Daytona sandbox base image to JFrog, tagged with the
+# commit SHA of the ref selected at dispatch time.
+on:
+ workflow_dispatch:
+
+concurrency:
+ group: push-sandbox-image
+ cancel-in-progress: false
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ name: Build and push sandbox image
+ uses: truefoundry/github-workflows-public/.github/workflows/build.yml@main
+ permissions:
+ id-token: write
+ contents: read
+ with:
+ artifactory_registry_url: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_REGISTRY_URL }}
+ artifactory_repository_url: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_REPOSITORY }}
+ image_artifact_name: truefoundry-utils-core-sandbox
+ image_tag: ${{ github.sha }}
+ image_context: packages/harness/scripts/sandbox
+ dockerfile_path: packages/harness/scripts/sandbox/sandbox.Dockerfile
+ # Dockerfile downloads linux-amd64 helm/nats binaries only.
+ platforms: linux/amd64
+ enable_jfrog: true
+ enable_public_ecr: false
+ secrets:
+ artifactory_username: ${{ secrets.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_USERNAME }}
+ artifactory_password: ${{ secrets.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_PASSWORD }}
+
+ print-uri:
+ name: Print pushed image URI
+ needs: [build]
+ runs-on: ubuntu-latest
+ steps:
+ - name: Print image URI
+ env:
+ IMAGE_URI: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_REPOSITORY }}/truefoundry-utils-core-sandbox:${{ github.sha }}
+ run: |
+ set -euo pipefail
+ echo "Pushed image URI: $IMAGE_URI"
+ echo "### Sandbox image" >> "$GITHUB_STEP_SUMMARY"
+ echo "\`$IMAGE_URI\`" >> "$GITHUB_STEP_SUMMARY"
diff --git a/.github/workflows/release-image-and-chart.yml b/.github/workflows/release-image-and-chart.yml
index 14196c7ab..09bfba6fd 100644
--- a/.github/workflows/release-image-and-chart.yml
+++ b/.github/workflows/release-image-and-chart.yml
@@ -1,15 +1,12 @@
name: Release image and Helm chart
-# Publishing a GitHub Release (tag vX.Y.Z) builds and pushes the server image,
-# then stamps that version into the Helm chart, packages it, pushes it to the
-# JFrog public OCI Helm repo, and attaches the .tgz to the release.
+# Manually dispatch to build and push the server image (tagged with the commit
+# SHA), stamp that SHA into the Helm chart, package it, and push it to the
+# JFrog public OCI Helm repo.
on:
- release:
- types: [published]
+ workflow_dispatch:
-# One release at a time so the commit back to main and the chart push cannot race.
-# The group is intentionally tag-independent so releases of different tags
-# serialize instead of running in parallel.
+# One release at a time so the chart push cannot race.
concurrency:
group: release-image-and-chart
cancel-in-progress: false
@@ -18,32 +15,32 @@ permissions:
contents: read
jobs:
+ # TODO: Re-enable this when we want to derive the version from the release tag.
# Derive the version from the release tag; it is the single source of truth for
# the image tag and the chart version/appVersion.
- prepare:
- name: Resolve release version
- runs-on: ubuntu-latest
- outputs:
- version: ${{ steps.version.outputs.version }}
- steps:
- - name: Resolve version
- id: version
- env:
- TAG: ${{ github.event.release.tag_name }}
- run: |
- set -euo pipefail
- VERSION="${TAG#v}"
- if ! printf '%s' "$VERSION" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$'; then
- echo "Release tag '$TAG' is not a semver vX.Y.Z tag" >&2
- exit 1
- fi
- echo "Releasing version $VERSION"
- echo "version=$VERSION" >> "$GITHUB_OUTPUT"
+ # prepare:
+ # name: Resolve release version
+ # runs-on: ubuntu-latest
+ # outputs:
+ # version: ${{ steps.version.outputs.version }}
+ # steps:
+ # - name: Resolve version
+ # id: version
+ # env:
+ # TAG: ${{ github.event.release.tag_name }}
+ # run: |
+ # set -euo pipefail
+ # VERSION="${TAG#v}"
+ # if ! printf '%s' "$VERSION" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$'; then
+ # echo "Release tag '$TAG' is not a semver vX.Y.Z tag" >&2
+ # exit 1
+ # fi
+ # echo "Releasing version $VERSION"
+ # echo "version=$VERSION" >> "$GITHUB_OUTPUT"
# Build and push the server image (API + UI) via the shared reusable workflow.
build:
name: Build and push server image
- needs: [prepare]
uses: truefoundry/github-workflows-public/.github/workflows/build.yml@main
permissions:
id-token: write
@@ -51,8 +48,8 @@ jobs:
with:
artifactory_registry_url: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_REGISTRY_URL }}
artifactory_repository_url: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_REPOSITORY }}
- image_artifact_name: trueforge
- image_tag: ${{ needs.prepare.outputs.version }}
+ image_artifact_name: truefoundry-utils
+ image_tag: ${{ github.sha }}
image_context: .
dockerfile_path: Dockerfile
platforms: linux/amd64,linux/arm64
@@ -64,32 +61,28 @@ jobs:
artifactory_username: ${{ secrets.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_USERNAME }}
artifactory_password: ${{ secrets.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_PASSWORD }}
- # Stamp the version into the chart, publish it, and attach the package to the release.
+ # Stamp the commit SHA into the chart, then package and publish it.
release-chart:
name: Package and publish Helm chart
- needs: [prepare, build]
+ needs: [build]
runs-on: ubuntu-latest
- permissions:
- contents: write
env:
- VERSION: ${{ needs.prepare.outputs.version }}
- CHART_DIR: charts/trueforge
+ # Helm requires SemVer for Chart.yaml version; prerelease form keeps the
+ # commit SHA while remaining packageable. Image tag stays the raw SHA.
+ VERSION: 0.0.0-${{ github.sha }}
+ IMAGE_TAG: ${{ github.sha }}
+ CHART_DIR: charts/truefoundry-utils
HELM_REGISTRY_URL: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_REGISTRY_URL }}
HELM_REGISTRY_USERNAME: ${{ secrets.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_USERNAME }}
HELM_REGISTRY_PASSWORD: ${{ secrets.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_PASSWORD }}
HELM_CHART_REPOSITORY: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_HELM_REPOSITORY }}
steps:
- # Package from the exact tagged commit so the published chart matches the
- # release (the image build uses the same tag). main is checked out
- # separately later, only for the version-bump commit.
- - name: Check out release tag
+ - name: Check out release commit
uses: actions/checkout@v4
- with:
- ref: ${{ github.event.release.tag_name }}
- name: Install yq
run: |
- sudo wget -q https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq
+ sudo wget -q https://github.com/mikefarah/yq/releases/download/v4.53.3/yq_linux_amd64 -O /usr/bin/yq
sudo chmod +x /usr/bin/yq
- name: Install Helm
@@ -97,13 +90,12 @@ jobs:
with:
version: v3.16.4
- # Pin the released version everywhere the chart references it.
- name: Stamp version into chart
run: |
set -euo pipefail
- yq -i '.version = strenv(VERSION) | .appVersion = strenv(VERSION)' "$CHART_DIR/Chart.yaml"
- yq -i '.image.tag = strenv(VERSION)' "$CHART_DIR/values.yaml"
- echo "Stamped chart to $VERSION"
+ yq -i '.version = strenv(VERSION) | .appVersion = strenv(IMAGE_TAG)' "$CHART_DIR/Chart.yaml"
+ yq -i '.image.tag = strenv(IMAGE_TAG)' "$CHART_DIR/values.yaml"
+ echo "Stamped chart version=$VERSION image.tag=$IMAGE_TAG"
- name: Helm registry login
run: |
@@ -116,7 +108,6 @@ jobs:
run: helm dependency build "$CHART_DIR"
- name: Package and push chart
- id: package
run: |
set -euo pipefail
CHART_NAME=$(yq -r '.name' "$CHART_DIR/Chart.yaml")
@@ -124,41 +115,12 @@ jobs:
PACKAGE="dist/${CHART_NAME}-${VERSION}.tgz"
echo "Pushing $PACKAGE to oci://$HELM_CHART_REPOSITORY"
helm push "$PACKAGE" "oci://$HELM_CHART_REPOSITORY"
- echo "package=$PACKAGE" >> "$GITHUB_OUTPUT"
- - name: Attach chart to the GitHub release
- uses: softprops/action-gh-release@v2
- with:
- tag_name: ${{ github.event.release.tag_name }}
- files: ${{ steps.package.outputs.package }}
- fail_on_unmatched_files: true
+ - name: Print image URI
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- # Sync the checked-in chart on main with the released version. Uses its own
- # main checkout (packaging above runs against the tag) and stamps main's
- # current chart files rather than copying the tag's, so unrelated changes
- # on main are preserved.
- - name: Check out main for the version bump
- uses: actions/checkout@v4
- with:
- ref: main
- path: main-checkout
-
- # Runs last so a rejected push to a protected main never blocks shipping
- # the artifacts.
- - name: Commit chart version bump to main
- working-directory: main-checkout
+ IMAGE_URI: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_REPOSITORY }}/truefoundry-utils:${{ github.sha }}
run: |
set -euo pipefail
- yq -i '.version = strenv(VERSION) | .appVersion = strenv(VERSION)' "$CHART_DIR/Chart.yaml"
- yq -i '.image.tag = strenv(VERSION)' "$CHART_DIR/values.yaml"
- if git diff --quiet -- "$CHART_DIR"; then
- echo "Chart already at $VERSION; nothing to commit."
- exit 0
- fi
- git config user.name "github-actions[bot]"
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- git add "$CHART_DIR/Chart.yaml" "$CHART_DIR/values.yaml"
- git commit -m "chore(chart): release trueforge $VERSION"
- git push origin HEAD:main
+ echo "Pushed image URI: $IMAGE_URI"
+ echo "### Server image" >> "$GITHUB_STEP_SUMMARY"
+ echo "\`$IMAGE_URI\`" >> "$GITHUB_STEP_SUMMARY"
diff --git a/README.md b/README.md
index eb40a1f65..f56bd7c1e 100644
--- a/README.md
+++ b/README.md
@@ -78,24 +78,23 @@ Every environment variable is documented in [`packages/server/.env.example`](pac
### Option 4: Kubernetes (Helm)
-The [`charts/trueforge`](charts/trueforge) Helm chart deploys the server with bundled Postgres and Redis (or point it at your own):
+The [`charts/truefoundry-utils`](charts/truefoundry-utils) Helm chart deploys the server in distributed mode (`STANDALONE=false`) with bundled Postgres and Redis (or point it at your own). No values are required for a basic install:
```bash
# TODO: replace <HELM_REPO> with the published Helm repo URL
-helm install trueforge oci://<HELM_REPO>/trueforge \
- --version <x.y.z> \
- --set server.publicBaseUrl=https://trueforge.example.com
+helm install truefoundry-utils oci://<HELM_REPO>/truefoundry-utils \
+ --version <x.y.z>
```
-| Configuration | Default | Description |
-| ---------------------- | ------------ | ----------------------------------------------------------------------------- |
-| `server.publicBaseUrl` | — (required) | Public origin for MCP OAuth callbacks. |
-| `replicaCount` | `1` | Number of server replicas (turn cancel/streaming peers over Redis). |
-| `postgresql.enabled` | `true` | Bundle Postgres; set `false` and fill `externalPostgres.*` to bring your own. |
-| `redis.enabled` | `true` | Bundle Redis; set `false` and set `externalRedis.url` to bring your own. |
-| `autoscaling.enabled` | `false` | Enable a HorizontalPodAutoscaler. |
+| Configuration | Default | Description |
+| ---------------------- | ------- | ------------------------------------------------------------------------------ |
+| `server.publicBaseUrl` | `""` | Public origin for MCP OAuth / OIDC callbacks; set once you expose the service. |
+| `replicaCount` | `1` | Number of server replicas (turn cancel/streaming peers over Redis). |
+| `postgresql.enabled` | `true` | Bundle Postgres; set `false` and fill `externalPostgres.*` to bring your own. |
+| `redis.enabled` | `true` | Bundle Redis; set `false` and set `externalRedis.url` or `existingSecret`. |
+| `autoscaling.enabled` | `false` | Enable a HorizontalPodAutoscaler. |
-See the [chart README](charts/trueforge/README.md) for external databases, ingress via `extraObjects`, and the full values reference.
+See the [chart README](charts/truefoundry-utils/README.md) for Secrets, external databases, ingress via `extraObjects`, and the full values reference.
## Getting started walkthrough
diff --git a/RELEASING.md b/RELEASING.md
index cd5f2ea19..c6eeb95a8 100644
--- a/RELEASING.md
+++ b/RELEASING.md
@@ -155,37 +155,38 @@ CODE_OF_CONDUCT, issue/PR templates.
# Releasing the server image + Helm chart
A separate pipeline ships the deployable artifacts: the server container image
-(API + UI, built from the root `Dockerfile`) and the `charts/trueforge` Helm
-chart. It is driven by `.github/workflows/release-image-and-chart.yml` and
-triggers when a **GitHub Release** is published (tag `vX.Y.Z`).
+(API + UI, built from the root `Dockerfile`) and the `charts/truefoundry-utils` Helm
+chart. It is driven by `.github/workflows/release-image-and-chart.yml` and runs
+only on manual **`workflow_dispatch`** (Actions → "Release image and Helm chart"
+→ Run workflow).
-## What the release tag drives
+## What the workflow does
-The tag is the single source of truth. On `vX.Y.Z` the workflow:
+The dispatch commit SHA is the image tag. The workflow:
1. **Builds and pushes the image** via the shared reusable workflow
`truefoundry/github-workflows-public/.github/workflows/build.yml@main` to the
- JFrog public Artifactory repo, tagged `X.Y.Z`. The chart pulls the image from
- JFrog, so JFrog is the only publish target (public ECR is disabled).
-2. **Stamps the chart** — sets `version`, `appVersion`, and `image.tag` in
- `charts/trueforge` to `X.Y.Z` and commits the bump back to `main`.
-3. **Publishes the chart** — packages `charts/trueforge` and pushes it to the
- JFrog public OCI Helm repo, then attaches the `.tgz` to the GitHub release.
+ JFrog public Artifactory repo, tagged with `github.sha`. The chart pulls the
+ image from JFrog, so JFrog is the only publish target (public ECR is disabled).
+2. **Stamps the chart in the runner workspace** — sets `Chart.yaml`
+ `version` to `0.0.0-<sha>` (Helm SemVer-compatible prerelease), and
+ `appVersion` / `image.tag` to the raw SHA. It does **not** commit those
+ stamps back to `main`.
+3. **Publishes the chart** — packages `charts/truefoundry-utils` and pushes it to
+ the JFrog public OCI Helm repo. It does not attach artifacts to a GitHub
+ Release.
## Per-release flow
-1. Cut the release from `main` (tag `vX.Y.Z`) via the GitHub Releases UI or:
+1. On the commit you want to ship, run the workflow from the Actions tab (or
+ `gh workflow run release-image-and-chart.yml`).
+2. Watch the run. The image and chart land in JFrog; the job summary prints the
+ image URI.
- ```bash
- gh release create vX.Y.Z --target main --generate-notes
- ```
-
-2. Watch the run under the repo's Actions tab. The image lands in JFrog, the
- chart lands in the OCI Helm repo, and the `.tgz` is attached to the release.
-
-> Publishing a `vX.Y.Z` tag also triggers `release.yml` (the npm publish of
-> `@truefoundry/utils-core`), which requires the tag to match
-> `packages/harness/package.json`. Keep that version in lockstep when tagging.
+> npm publish of `@truefoundry/utils-core` is a separate pipeline
+> (`release.yml`) triggered by a `vX.Y.Z` GitHub Release tag that must match
+> `packages/harness/package.json`. It is independent of this image/chart
+> workflow.
## Required repository configuration
@@ -199,7 +200,7 @@ Org/repo **secrets**: `TRUEFOUNDRY_ARTIFACTORY_PUBLIC_USERNAME`,
## Bundled dependencies
The chart bundles Postgres and Redis as optional Bitnami subcharts, declared in
-`charts/trueforge/Chart.yaml` against the public Bitnami OCI archive
+`charts/truefoundry-utils/Chart.yaml` against the public Bitnami OCI archive
(`oci://registry-1.docker.io/bitnamicharts`) and pinned by the committed
`Chart.lock`. The workflow fetches them with `helm dependency build` before
packaging (the archive is public, no auth). Disable them with
@@ -207,7 +208,7 @@ packaging (the archive is public, no auth). Disable them with
**Images vs charts.** Bitnami left the charts public but relocated their
container images to `docker.io/bitnamilegacy` (frozen, no security updates). So
-`charts/trueforge/values.yaml` overrides the subchart images to pinned legacy
+`charts/truefoundry-utils/values.yaml` overrides the subchart images to pinned legacy
tags mirrored to the TrueFoundry JFrog registry, and sets
`global.security.allowInsecureImages: true` (required once the registry differs
from Bitnami's default). Mirror the images once per pinned tag:
@@ -233,7 +234,7 @@ Fetch the subchart deps first (public archive, no auth), then lint/template:
```bash
pnpm chart:deps # helm dependency build (writes charts/, uses Chart.lock)
-pnpm chart:lint # helm lint with charts/trueforge/ci/lint-values.yaml
+pnpm chart:lint # helm lint with charts/truefoundry-utils/ci/lint-values.yaml
pnpm chart:template # render the manifests
pnpm chart:package # package to dist/ (gitignored)
```
diff --git a/charts/trueforge/README.md b/charts/trueforge/README.md
deleted file mode 100644
index 5e44dbff5..000000000
--- a/charts/trueforge/README.md
+++ /dev/null
@@ -1,101 +0,0 @@
-# trueforge Helm chart
-
-Deploys the TrueForge server, a single container image that serves both the API
-and the UI (built from the repository-root `Dockerfile`).
-
-The chart version, `appVersion`, and `image.tag` are stamped from the Git tag by
-[`.github/workflows/release-image-and-chart.yml`](../../.github/workflows/release-image-and-chart.yml)
-when a GitHub Release is published, so the committed values reflect the last
-release.
-
-## Dependencies
-
-Postgres and Redis ship as **bundled** dependencies (the Bitnami `postgresql`
-and `redis` charts, pulled from the public Bitnami OCI archive and pinned by
-`Chart.lock`). They are enabled by default, so a basic install only needs
-`server.publicBaseUrl`. The chart wires the server's `POSTGRES_*` and
-`REDIS_URL` env to the bundled services automatically.
-
-The Bitnami **charts** are still public, but the **container images** they
-reference were moved to `docker.io/bitnamilegacy`, so `values.yaml` overrides the
-subchart images to pinned tags mirrored to the TrueFoundry JFrog registry
-(`tfy.jfrog.io/tfy-mirror/bitnamilegacy/...`). This trips Bitnami's registry
-guardrail, so `global.security.allowInsecureImages: true` is set for the
-subcharts to render.
-
-Disable either dependency to point at an external service instead (see below).
-
-## Install
-
-```bash
-helm install trueforge oci://<jfrog-public-helm-repo>/trueforge \
- --version <x.y.z> \
- --set server.publicBaseUrl=https://trueforge.example.com
-```
-
-## Required values
-
-| Value | Description |
-| ---------------------- | ---------------------------------------------------------- |
-| `server.publicBaseUrl` | Public origin for MCP OAuth callbacks (`PUBLIC_BASE_URL`). |
-
-## Postgres
-
-Bundled by default (`postgresql.enabled=true`). Set `postgresql.auth.username`,
-`postgresql.auth.password` (or `postgresql.auth.existingSecret`), and
-`postgresql.auth.database`; the server connects to it automatically.
-
-To use an **external** Postgres, set `postgresql.enabled=false` and provide
-`externalPostgres.host` (+ `port`, `database`, `user`) with the password one of
-two ways:
-
-- Set `externalPostgres.password` and the chart renders a `Secret`, or
-- Set `externalPostgres.existingSecret` (and optionally `externalPostgres.passwordKey`,
- default `password`) to reference a `Secret` you manage.
-
-## Redis
-
-The server always runs peered (`SINGLE_BINARY=false`), so Redis is always
-required. Bundled by default (`redis.enabled=true`, auth disabled). To use an
-**external** Redis, set `redis.enabled=false` and `externalRedis.url`.
-
-## Extra objects
-
-Deploy arbitrary manifests alongside the server (for example an Istio
-`VirtualService`, a `Gateway`, an `Ingress`, or a `NetworkPolicy`) via
-`extraObjects`. Each entry is a full object, rendered through `tpl` so Helm
-templating and chart helpers resolve:
-
-```yaml
-extraObjects:
- - apiVersion: networking.istio.io/v1
- kind: VirtualService
- metadata:
- name: '{{ include "trueforge.fullname" . }}'
- spec:
- hosts:
- - trueforge.example.com
- gateways:
- - istio-system/public-gateway
- http:
- - route:
- - destination:
- host: '{{ include "trueforge.fullname" . }}'
- port:
- number: '{{ .Values.service.port }}'
-```
-
-## Common values
-
-| Value | Default | Description |
-| --------------------- | ----------------------------------- | ------------------------------------- |
-| `replicaCount` | `1` | Number of server replicas. |
-| `image.repository` | `tfy.jfrog.io/tfy-images/trueforge` | Image repository. |
-| `image.tag` | chart `appVersion` | Image tag; stamped on release. |
-| `postgresql.enabled` | `true` | Bundle the Bitnami Postgres subchart. |
-| `redis.enabled` | `true` | Bundle the Bitnami Redis subchart. |
-| `service.type` | `ClusterIP` | Service type. |
-| `service.port` | `8790` | Service port. |
-| `server.port` | `8790` | Container port (`PORT`). |
-| `autoscaling.enabled` | `false` | Enable a HorizontalPodAutoscaler. |
-| `resources` | `{}` | Container resource requests/limits. |
diff --git a/charts/trueforge/ci/lint-values.yaml b/charts/trueforge/ci/lint-values.yaml
deleted file mode 100644
index 7b8291645..000000000
--- a/charts/trueforge/ci/lint-values.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-# Minimal values that satisfy the chart's required() checks so `helm lint` and
-# `helm template` render cleanly. Postgres and Redis are bundled by default, so
-# only the public base URL is required. Not packaged (see .helmignore).
-#
-# Requires the subchart dependencies to be present first: run `pnpm chart:deps`
-# (pulls the public Bitnami OCI charts, no auth) before linting/templating.
-server:
- publicBaseUrl: https://trueforge.example.com
diff --git a/charts/trueforge/templates/NOTES.txt b/charts/trueforge/templates/NOTES.txt
deleted file mode 100644
index b1c86d60c..000000000
--- a/charts/trueforge/templates/NOTES.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-TrueForge {{ .Chart.AppVersion }} has been deployed as release {{ .Release.Name }}.
-
-Image: {{ include "trueforge.image" . }}
-
-Reach the server (API + UI) inside the cluster at:
- http://{{ include "trueforge.fullname" . }}.{{ .Release.Namespace }}.svc:{{ .Values.service.port }}
-
-Port-forward it locally with:
- kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ include "trueforge.fullname" . }} 8790:{{ .Values.service.port }}
-
-Then open http://localhost:8790 and check http://localhost:8790/healthz.
-
-Postgres: {{ if .Values.postgresql.enabled }}bundled ({{ include "trueforge.postgres.host" . }}){{ else }}external ({{ include "trueforge.postgres.host" . }}){{ end }}
-Redis: {{ if .Values.redis.enabled }}bundled ({{ include "trueforge.redis.url" . }}){{ else }}external ({{ include "trueforge.redis.url" . }}){{ end }}
-
-{{- if and (not .Values.postgresql.enabled) (not .Values.externalPostgres.host) }}
-
-WARNING: postgresql.enabled is false and externalPostgres.host is empty. Set one so the server can reach Postgres.
-{{- end }}
diff --git a/charts/trueforge/templates/service.yaml b/charts/trueforge/templates/service.yaml
deleted file mode 100644
index c2eb2e642..000000000
--- a/charts/trueforge/templates/service.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ include "trueforge.fullname" . }}
- labels:
- {{- include "trueforge.labels" . | nindent 4 }}
-spec:
- type: {{ .Values.service.type }}
- ports:
- - port: {{ .Values.service.port }}
- targetPort: http
- protocol: TCP
- name: http
- selector:
- {{- include "trueforge.selectorLabels" . | nindent 4 }}
diff --git a/charts/trueforge/.helmignore b/charts/truefoundry-utils/.helmignore
similarity index 100%
rename from charts/trueforge/.helmignore
rename to charts/truefoundry-utils/.helmignore
diff --git a/charts/trueforge/Chart.lock b/charts/truefoundry-utils/Chart.lock
similarity index 100%
rename from charts/trueforge/Chart.lock
rename to charts/truefoundry-utils/Chart.lock
diff --git a/charts/trueforge/Chart.yaml b/charts/truefoundry-utils/Chart.yaml
similarity index 69%
rename from charts/trueforge/Chart.yaml
rename to charts/truefoundry-utils/Chart.yaml
index a99b3092b..b64df3d1a 100644
--- a/charts/trueforge/Chart.yaml
+++ b/charts/truefoundry-utils/Chart.yaml
@@ -1,16 +1,16 @@
apiVersion: v2
-name: trueforge
-description: TrueForge server (API + UI) served from a single container image.
+name: truefoundry-utils
+description: TrueFoundry Utils server (API + UI) served from a single container image.
type: application
-# version (chart) and appVersion are stamped from the release tag by
-# .github/workflows/release-image-and-chart.yml; the committed values are the
-# last release.
+# version (chart) and appVersion are stamped at publish time by
+# .github/workflows/release-image-and-chart.yml (workflow_dispatch, commit SHA);
+# committed values are placeholders until that workflow runs.
version: 0.0.1
appVersion: "0.0.1"
kubeVersion: ">=1.25.0-0"
-home: https://github.com/truefoundry/trueforge
+home: https://truefoundry.com
sources:
- - https://github.com/truefoundry/trueforge
+ - https://truefoundry.com
maintainers:
- name: TrueFoundry
url: https://truefoundry.com
diff --git a/charts/truefoundry-utils/README.md b/charts/truefoundry-utils/README.md
new file mode 100644
index 000000000..204221a5f
--- /dev/null
+++ b/charts/truefoundry-utils/README.md
@@ -0,0 +1,192 @@
+# truefoundry-utils Helm chart
+
+Deploys the TrueFoundry Utils server, a single container image that serves both the API
+and the UI (built from the repository-root `Dockerfile`).
+
+The chart always runs the server in **distributed** mode (`STANDALONE=false`) against
+Postgres and Redis.
+
+The chart version, `appVersion`, and `image.tag` are stamped at publish time by
+[`.github/workflows/release-image-and-chart.yml`](../../.github/workflows/release-image-and-chart.yml)
+(manual `workflow_dispatch`, commit SHA as the image tag). Committed chart
+values are placeholders until that workflow runs.
+
+## Dependencies
+
+Postgres and Redis ship as **bundled** dependencies (the Bitnami `postgresql`
+and `redis` charts, pulled from the public Bitnami OCI archive and pinned by
+`Chart.lock`). They are enabled by default, so a basic install needs **no
+required values**. The chart wires the server's `POSTGRES_*` and `REDIS_URL`
+env to the bundled services automatically.
+
+The Bitnami **charts** are still public, but the **container images** they
+reference were moved to `docker.io/bitnamilegacy`, so `values.yaml` overrides the
+subchart images to pinned tags mirrored to the TrueFoundry JFrog registry
+(`tfy.jfrog.io/tfy-mirror/bitnamilegacy/...`). This trips Bitnami's registry
+guardrail, so `global.security.allowInsecureImages: true` is set for the
+subcharts to render.
+
+Disable either dependency to point at an external service instead (see below).
+
+## Install
+
+```bash
+helm install truefoundry-utils oci://<jfrog-public-helm-repo>/truefoundry-utils \
+ --version <x.y.z>
+```
+
+Optional: set the public origin once you expose the service (needed for MCP OAuth
+and OIDC callbacks):
+
+```bash
+helm upgrade --install truefoundry-utils oci://<jfrog-public-helm-repo>/truefoundry-utils \
+ --version <x.y.z> \
+ --set server.publicBaseUrl=https://truefoundry-utils.example.com
+```
+
+## Postgres
+
+Bundled by default (`postgresql.enabled=true`). Set `postgresql.auth.username`,
+`postgresql.auth.password` (or `postgresql.auth.existingSecret`), and
+`postgresql.auth.database`; the server connects to it automatically.
+
+To use an **external** Postgres, set `postgresql.enabled=false` and provide
+`externalPostgres.host` (+ `port`, `database`, `user`) with the password one of
+two ways:
+
+- Set `externalPostgres.password` and the chart renders a `Secret`, or
+- Set `externalPostgres.existingSecret` (and optionally `externalPostgres.passwordKey`,
+ default `password`) to reference a `Secret` you manage.
+
+## Redis
+
+The server always runs peered (`STANDALONE=false`), so Redis is always required.
+Bundled by default (`redis.enabled=true`, auth disabled). To use an **external**
+Redis, set `redis.enabled=false` and provide the connection URL one of two ways:
+
+- Set `externalRedis.url` (literal; fine for local/dev), or
+- Set `externalRedis.existingSecret` (and optionally `externalRedis.urlKey`,
+ default `redis-url`) to reference a `Secret` you manage.
+
+For passworded Redis, prefer an external instance and load `REDIS_URL` from a Secret.
+
+## Using Secrets
+
+Prefer Kubernetes Secrets over literals in values files for production.
+
+**Bundled Postgres password** — Bitnami `postgresql.auth.existingSecret` (key `password`):
+
+```yaml
+postgresql:
+ auth:
+ existingSecret: my-postgres-secret
+ # leave password empty / unused when existingSecret is set
+```
+
+**External Postgres password**:
+
+```yaml
+postgresql:
+ enabled: false
+externalPostgres:
+ host: postgres.databases.svc
+ existingSecret: my-postgres-secret
+ passwordKey: password
+```
+
+**External Redis URL**:
+
+```yaml
+redis:
+ enabled: false
+externalRedis:
+ existingSecret: my-redis-secret
+ urlKey: redis-url
+```
+
+**OIDC and other env secrets** — use `server.extraEnv` / `server.extraEnvFrom`
+(first-class OIDC values are not wired yet):
+
+```yaml
+server:
+ extraEnv:
+ - name: OIDC_ISSUER_URL
+ value: https://idp.example.com
+ - name: OIDC_CLIENT_ID
+ valueFrom:
+ secretKeyRef:
+ name: truefoundry-utils-oidc
+ key: client-id
+ - name: OIDC_CLIENT_SECRET
+ valueFrom:
+ secretKeyRef:
+ name: truefoundry-utils-oidc
+ key: client-secret
+```
+
+Or load a whole Secret as env:
+
+```yaml
+server:
+ extraEnvFrom:
+ - secretRef:
+ name: truefoundry-utils-oidc
+```
+
+## Extra objects
+
+Deploy arbitrary manifests alongside the server (for example an Istio
+`VirtualService`, a `Gateway`, an Ingress, or a NetworkPolicy) via
+`extraObjects`. Each entry is a full object, rendered through `tpl` so Helm
+templating and chart helpers resolve:
+
+```yaml
+extraObjects:
+ - apiVersion: networking.istio.io/v1
+ kind: VirtualService
+ metadata:
+ name: '{{ include "truefoundry-utils.fullname" . }}'
+ spec:
+ hosts:
+ - truefoundry-utils.example.com
+ gateways:
+ - istio-system/public-gateway
+ http:
+ - route:
+ - destination:
+ host: '{{ include "truefoundry-utils.fullname" . }}'
+ port:
+ number: '{{ .Values.service.port }}'
+```
+
+## Common values
+
+| Value | Default | Description |
+| --------------------- | ----------------------------------- | ------------------------------------- |
+| `replicaCount` | `1` | Number of server replicas. |
+| `image.repository` | `tfy.jfrog.io/tfy-images/truefoundry-utils` | Image repository. |
+| `image.tag` | chart `appVersion` | Image tag; stamped on release. |
+| `server.publicBaseUrl`| `""` | Public origin for OAuth/OIDC callbacks. |
+| `postgresql.enabled` | `true` | Bundle the Bitnami Postgres subchart. |
+| `redis.enabled` | `true` | Bundle the Bitnami Redis subchart. |
+| `service.type` | `ClusterIP` | Service type. |
+| `service.port` | `8790` | Service port. |
+| `server.port` | `8790` | Container port (`PORT`). |
+| `autoscaling.enabled` | `false` | Enable a HorizontalPodAutoscaler. |
+| `podDisruptionBudget.enabled` | `false` | Enable a PodDisruptionBudget (`minAvailable` defaults to `1`). |
+| `resources` | `{}` | Container resource requests/limits. |
+
+Also available (defaults inert): `strategy`, `priorityClassName`,
+`topologySpreadConstraints`, `initContainers`, `extraContainers`,
+`extraVolumes`, `extraVolumeMounts`, `service.annotations`, `service.labels`,
+`startupProbe`.
+
+## Production checklist
+
+- Set `server.publicBaseUrl` to the real public origin before using MCP OAuth or OIDC.
+- Prefer `existingSecret` for Postgres and Redis credentials; do not commit passwords in values files.
+- Prefer external managed Postgres/Redis over the bundled subcharts for production HA.
+- Set container `resources` (especially CPU requests) before enabling HPA.
+- Add `imagePullSecrets` when pulling from `tfy.jfrog.io`.
+- Configure OIDC via `server.extraEnv` / `extraEnvFrom` when you need IdP login.
+- Enable `podDisruptionBudget` when running multiple replicas (defaults to `minAvailable: 1`; set exactly one of `minAvailable` or `maxUnavailable`).
diff --git a/charts/truefoundry-utils/ci/lint-values.yaml b/charts/truefoundry-utils/ci/lint-values.yaml
new file mode 100644
index 000000000..fa81e950b
--- /dev/null
+++ b/charts/truefoundry-utils/ci/lint-values.yaml
@@ -0,0 +1,7 @@
+# Empty overlay so `helm lint` / `helm template` exercise chart defaults
+# (no required values when Postgres and Redis are bundled). Not packaged
+# (see .helmignore).
+#
+# Requires the subchart dependencies to be present first: run `pnpm chart:deps`
+# (pulls the public Bitnami OCI charts, no auth) before linting/templating.
+{}
diff --git a/charts/truefoundry-utils/templates/NOTES.txt b/charts/truefoundry-utils/templates/NOTES.txt
new file mode 100644
index 000000000..d297bee19
--- /dev/null
+++ b/charts/truefoundry-utils/templates/NOTES.txt
@@ -0,0 +1,24 @@
+TrueFoundry Utils {{ .Chart.AppVersion }} has been deployed as release {{ .Release.Name }}.
+
+Image: {{ include "truefoundry-utils.image" . }}
+
+Reach the server (API + UI) inside the cluster at:
+ http://{{ include "truefoundry-utils.fullname" . }}.{{ .Release.Namespace }}.svc:{{ .Values.service.port }}
+
+Port-forward it locally with:
+ kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ include "truefoundry-utils.fullname" . }} 8790:{{ .Values.service.port }}
+
+Then open http://localhost:8790 and check http://localhost:8790/healthz.
+
+Postgres: {{ if .Values.postgresql.enabled }}bundled ({{ include "truefoundry-utils.postgres.host" . }}){{ else }}external ({{ include "truefoundry-utils.postgres.host" . }}){{ end }}
+Redis: {{ if .Values.redis.enabled }}bundled{{- else }}external (Secret or url){{- end }}
+
+{{- if not .Values.server.publicBaseUrl }}
+
+NOTE: server.publicBaseUrl is empty. MCP OAuth and OIDC callbacks will fail until you set it to the public origin (e.g. https://truefoundry-utils.example.com).
+{{- end }}
+
+{{- if and (not .Values.postgresql.enabled) (not .Values.externalPostgres.host) }}
+
+WARNING: postgresql.enabled is false and externalPostgres.host is empty. Set one so the server can reach Postgres.
+{{- end }}
diff --git a/charts/trueforge/templates/_helpers.tpl b/charts/truefoundry-utils/templates/_helpers.tpl
similarity index 64%
rename from charts/trueforge/templates/_helpers.tpl
rename to charts/truefoundry-utils/templates/_helpers.tpl
index 5893bf0a9..c04d0af96 100644
--- a/charts/trueforge/templates/_helpers.tpl
+++ b/charts/truefoundry-utils/templates/_helpers.tpl
@@ -1,14 +1,14 @@
{{/*
Expand the name of the chart.
*/}}
-{{- define "trueforge.name" -}}
+{{- define "truefoundry-utils.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
*/}}
-{{- define "trueforge.fullname" -}}
+{{- define "truefoundry-utils.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
@@ -24,16 +24,16 @@ Create a default fully qualified app name.
{{/*
Chart name and version as used by the chart label.
*/}}
-{{- define "trueforge.chart" -}}
+{{- define "truefoundry-utils.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels.
*/}}
-{{- define "trueforge.labels" -}}
-helm.sh/chart: {{ include "trueforge.chart" . }}
-{{ include "trueforge.selectorLabels" . }}
+{{- define "truefoundry-utils.labels" -}}
+helm.sh/chart: {{ include "truefoundry-utils.chart" . }}
+{{ include "truefoundry-utils.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
@@ -43,17 +43,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels.
*/}}
-{{- define "trueforge.selectorLabels" -}}
-app.kubernetes.io/name: {{ include "trueforge.name" . }}
+{{- define "truefoundry-utils.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "truefoundry-utils.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Service account name.
*/}}
-{{- define "trueforge.serviceAccountName" -}}
+{{- define "truefoundry-utils.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
-{{- default (include "trueforge.fullname" .) .Values.serviceAccount.name }}
+{{- default (include "truefoundry-utils.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
@@ -62,7 +62,7 @@ Service account name.
{{/*
Container image reference; tag falls back to the chart appVersion.
*/}}
-{{- define "trueforge.image" -}}
+{{- define "truefoundry-utils.image" -}}
{{- printf "%s:%s" .Values.image.repository (.Values.image.tag | default .Chart.AppVersion) }}
{{- end }}
@@ -70,7 +70,7 @@ Container image reference; tag falls back to the chart appVersion.
Postgres connection. Sourced from the bundled Bitnami postgresql subchart when
postgresql.enabled, otherwise from externalPostgres.
*/}}
-{{- define "trueforge.postgres.host" -}}
+{{- define "truefoundry-utils.postgres.host" -}}
{{- if .Values.postgresql.enabled -}}
{{- printf "%s-postgresql" .Release.Name -}}
{{- else -}}
@@ -78,15 +78,15 @@ postgresql.enabled, otherwise from externalPostgres.
{{- end -}}
{{- end }}
-{{- define "trueforge.postgres.port" -}}
+{{- define "truefoundry-utils.postgres.port" -}}
{{- if .Values.postgresql.enabled -}}5432{{- else -}}{{ .Values.externalPostgres.port }}{{- end -}}
{{- end }}
-{{- define "trueforge.postgres.user" -}}
+{{- define "truefoundry-utils.postgres.user" -}}
{{- if .Values.postgresql.enabled -}}{{ .Values.postgresql.auth.username }}{{- else -}}{{ .Values.externalPostgres.user }}{{- end -}}
{{- end }}
-{{- define "trueforge.postgres.database" -}}
+{{- define "truefoundry-utils.postgres.database" -}}
{{- if .Values.postgresql.enabled -}}{{ .Values.postgresql.auth.database }}{{- else -}}{{ .Values.externalPostgres.database }}{{- end -}}
{{- end }}
@@ -96,29 +96,38 @@ Name of the Secret holding the Postgres password, and its key.
- external existingSecret: that Secret and its passwordKey.
- external literal password: a Secret this chart renders (see secret.yaml).
*/}}
-{{- define "trueforge.postgres.secretName" -}}
+{{- define "truefoundry-utils.postgres.secretName" -}}
{{- if .Values.postgresql.enabled -}}
{{- default (printf "%s-postgresql" .Release.Name) .Values.postgresql.auth.existingSecret -}}
{{- else if .Values.externalPostgres.existingSecret -}}
{{- .Values.externalPostgres.existingSecret -}}
{{- else -}}
{{- $_ := required "externalPostgres.password or externalPostgres.existingSecret is required when postgresql.enabled is false" .Values.externalPostgres.password -}}
-{{- printf "%s-postgres" (include "trueforge.fullname" .) -}}
+{{- printf "%s-postgres" (include "truefoundry-utils.fullname" .) -}}
{{- end -}}
{{- end }}
-{{- define "trueforge.postgres.secretKey" -}}
+{{- define "truefoundry-utils.postgres.secretKey" -}}
{{- if .Values.postgresql.enabled -}}password{{- else -}}{{ .Values.externalPostgres.passwordKey }}{{- end -}}
{{- end }}
{{/*
-Redis connection URL. The server always runs peered, so a Redis is always
-required: the bundled auth-less standalone master, or externalRedis.url.
+True when REDIS_URL should be loaded from externalRedis.existingSecret.
*/}}
-{{- define "trueforge.redis.url" -}}
+{{- define "truefoundry-utils.redis.useSecret" -}}
+{{- if and (not .Values.redis.enabled) .Values.externalRedis.existingSecret -}}true{{- end -}}
+{{- end }}
+
+{{/*
+Redis connection URL literal. Used when redis is bundled, or when external
+Redis is configured via externalRedis.url (not existingSecret).
+*/}}
+{{- define "truefoundry-utils.redis.url" -}}
{{- if .Values.redis.enabled -}}
{{- printf "redis://%s-redis-master:6379" .Release.Name -}}
+{{- else if .Values.externalRedis.existingSecret -}}
+{{- fail "truefoundry-utils.redis.url must not be used when externalRedis.existingSecret is set" -}}
{{- else -}}
-{{- required "externalRedis.url is required when redis.enabled is false (the server always needs Redis)" .Values.externalRedis.url -}}
+{{- required "externalRedis.url or externalRedis.existingSecret is required when redis.enabled is false (the server always needs Redis)" .Values.externalRedis.url -}}
{{- end -}}
{{- end }}
diff --git a/charts/trueforge/templates/deployment.yaml b/charts/truefoundry-utils/templates/deployment.yaml
similarity index 56%
rename from charts/trueforge/templates/deployment.yaml
rename to charts/truefoundry-utils/templates/deployment.yaml
index f748d33b2..7e83fdcf0 100644
--- a/charts/trueforge/templates/deployment.yaml
+++ b/charts/truefoundry-utils/templates/deployment.yaml
@@ -1,20 +1,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
- name: {{ include "trueforge.fullname" . }}
+ name: {{ include "truefoundry-utils.fullname" . }}
labels:
- {{- include "trueforge.labels" . | nindent 4 }}
+ {{- include "truefoundry-utils.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
+ {{- with .Values.strategy }}
+ strategy:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
selector:
matchLabels:
- {{- include "trueforge.selectorLabels" . | nindent 6 }}
+ {{- include "truefoundry-utils.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
- {{- include "trueforge.selectorLabels" . | nindent 8 }}
+ {{- include "truefoundry-utils.selectorLabels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
@@ -27,16 +31,23 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
- serviceAccountName: {{ include "trueforge.serviceAccountName" . }}
+ serviceAccountName: {{ include "truefoundry-utils.serviceAccountName" . }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
+ {{- with .Values.priorityClassName }}
+ priorityClassName: {{ . | quote }}
+ {{- end }}
# Above the server's GRACEFUL_TIMEOUT_SECONDS so SIGKILL does not cut off turn drain.
terminationGracePeriodSeconds: {{ add .Values.server.gracefulTimeoutSeconds 5 }}
+ {{- with .Values.initContainers }}
+ initContainers:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
containers:
- name: server
- image: {{ include "trueforge.image" . | quote }}
+ image: {{ include "truefoundry-utils.image" . | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.securityContext }}
securityContext:
@@ -52,27 +63,34 @@ spec:
- name: PORT
value: {{ .Values.server.port | quote }}
- name: PUBLIC_BASE_URL
- value: {{ required "server.publicBaseUrl is required" .Values.server.publicBaseUrl | quote }}
+ value: {{ .Values.server.publicBaseUrl | quote }}
# The server always runs peered against Postgres + Redis.
- name: STANDALONE
value: "false"
- name: GRACEFUL_TIMEOUT_SECONDS
value: {{ .Values.server.gracefulTimeoutSeconds | quote }}
- name: REDIS_URL
- value: {{ include "trueforge.redis.url" . | quote }}
+ {{- if eq (include "truefoundry-utils.redis.useSecret" .) "true" }}
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.externalRedis.existingSecret | quote }}
+ key: {{ .Values.externalRedis.urlKey | quote }}
+ {{- else }}
+ value: {{ include "truefoundry-utils.redis.url" . | quote }}
+ {{- end }}
- name: POSTGRES_HOST
- value: {{ include "trueforge.postgres.host" . | quote }}
+ value: {{ include "truefoundry-utils.postgres.host" . | quote }}
- name: POSTGRES_PORT
- value: {{ include "trueforge.postgres.port" . | quote }}
+ value: {{ include "truefoundry-utils.postgres.port" . | quote }}
- name: POSTGRES_DB
- value: {{ include "trueforge.postgres.database" . | quote }}
+ value: {{ include "truefoundry-utils.postgres.database" . | quote }}
- name: POSTGRES_USER
- value: {{ include "trueforge.postgres.user" . | quote }}
+ value: {{ include "truefoundry-utils.postgres.user" . | quote }}
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
- name: {{ include "trueforge.postgres.secretName" . }}
- key: {{ include "trueforge.postgres.secretKey" . }}
+ name: {{ include "truefoundry-utils.postgres.secretName" . }}
+ key: {{ include "truefoundry-utils.postgres.secretKey" . }}
{{- with .Values.server.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
@@ -80,6 +98,10 @@ spec:
envFrom:
{{- toYaml . | nindent 12 }}
{{- end }}
+ {{- with .Values.startupProbe }}
+ startupProbe:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
{{- with .Values.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
@@ -92,6 +114,17 @@ spec:
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
+ {{- with .Values.extraVolumeMounts }}
+ volumeMounts:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
+ {{- with .Values.extraContainers }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.extraVolumes }}
+ volumes:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
@@ -104,3 +137,7 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
+ {{- with .Values.topologySpreadConstraints }}
+ topologySpreadConstraints:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
diff --git a/charts/trueforge/templates/extra-objects.yaml b/charts/truefoundry-utils/templates/extra-objects.yaml
similarity index 100%
rename from charts/trueforge/templates/extra-objects.yaml
rename to charts/truefoundry-utils/templates/extra-objects.yaml
diff --git a/charts/trueforge/templates/hpa.yaml b/charts/truefoundry-utils/templates/hpa.yaml
similarity index 74%
rename from charts/trueforge/templates/hpa.yaml
rename to charts/truefoundry-utils/templates/hpa.yaml
index cf6061f36..c4a1e6d09 100644
--- a/charts/trueforge/templates/hpa.yaml
+++ b/charts/truefoundry-utils/templates/hpa.yaml
@@ -2,14 +2,14 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
- name: {{ include "trueforge.fullname" . }}
+ name: {{ include "truefoundry-utils.fullname" . }}
labels:
- {{- include "trueforge.labels" . | nindent 4 }}
+ {{- include "truefoundry-utils.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
- name: {{ include "trueforge.fullname" . }}
+ name: {{ include "truefoundry-utils.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
diff --git a/charts/truefoundry-utils/templates/pdb.yaml b/charts/truefoundry-utils/templates/pdb.yaml
new file mode 100644
index 000000000..9369f0d0d
--- /dev/null
+++ b/charts/truefoundry-utils/templates/pdb.yaml
@@ -0,0 +1,27 @@
+{{- if .Values.podDisruptionBudget.enabled }}
+{{- /* toString so integer 0 is distinct from unset ("" / nil); if/with treat 0 as falsy. */}}
+{{- $min := .Values.podDisruptionBudget.minAvailable | toString }}
+{{- $max := .Values.podDisruptionBudget.maxUnavailable | toString }}
+{{- if and (ne $min "") (ne $max "") }}
+{{- fail "podDisruptionBudget: set exactly one of minAvailable or maxUnavailable, not both" }}
+{{- end }}
+{{- if and (eq $min "") (eq $max "") }}
+{{- fail "podDisruptionBudget: set exactly one of minAvailable or maxUnavailable when enabled" }}
+{{- end }}
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+ name: {{ include "truefoundry-utils.fullname" . }}
+ labels:
+ {{- include "truefoundry-utils.labels" . | nindent 4 }}
+spec:
+ {{- if ne $min "" }}
+ minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
+ {{- end }}
+ {{- if ne $max "" }}
+ maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
+ {{- end }}
+ selector:
+ matchLabels:
+ {{- include "truefoundry-utils.selectorLabels" . | nindent 6 }}
+{{- end }}
diff --git a/charts/trueforge/templates/secret.yaml b/charts/truefoundry-utils/templates/secret.yaml
similarity index 77%
rename from charts/trueforge/templates/secret.yaml
rename to charts/truefoundry-utils/templates/secret.yaml
index 982cbc9f5..d82b91ffb 100644
--- a/charts/trueforge/templates/secret.yaml
+++ b/charts/truefoundry-utils/templates/secret.yaml
@@ -6,9 +6,9 @@ The bundled postgresql subchart manages its own Secret.
apiVersion: v1
kind: Secret
metadata:
- name: {{ printf "%s-postgres" (include "trueforge.fullname" .) }}
+ name: {{ printf "%s-postgres" (include "truefoundry-utils.fullname" .) }}
labels:
- {{- include "trueforge.labels" . | nindent 4 }}
+ {{- include "truefoundry-utils.labels" . | nindent 4 }}
type: Opaque
stringData:
{{ .Values.externalPostgres.passwordKey }}: {{ .Values.externalPostgres.password | quote }}
diff --git a/charts/truefoundry-utils/templates/service.yaml b/charts/truefoundry-utils/templates/service.yaml
new file mode 100644
index 000000000..12a2fb776
--- /dev/null
+++ b/charts/truefoundry-utils/templates/service.yaml
@@ -0,0 +1,22 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "truefoundry-utils.fullname" . }}
+ labels:
+ {{- include "truefoundry-utils.labels" . | nindent 4 }}
+ {{- with .Values.service.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- with .Values.service.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ - port: {{ .Values.service.port }}
+ targetPort: http
+ protocol: TCP
+ name: http
+ selector:
+ {{- include "truefoundry-utils.selectorLabels" . | nindent 4 }}
diff --git a/charts/trueforge/templates/serviceaccount.yaml b/charts/truefoundry-utils/templates/serviceaccount.yaml
similarity index 63%
rename from charts/trueforge/templates/serviceaccount.yaml
rename to charts/truefoundry-utils/templates/serviceaccount.yaml
index 9b80fd1bc..6fd29c4b3 100644
--- a/charts/trueforge/templates/serviceaccount.yaml
+++ b/charts/truefoundry-utils/templates/serviceaccount.yaml
@@ -2,9 +2,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
- name: {{ include "trueforge.serviceAccountName" . }}
+ name: {{ include "truefoundry-utils.serviceAccountName" . }}
labels:
- {{- include "trueforge.labels" . | nindent 4 }}
+ {{- include "truefoundry-utils.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
diff --git a/charts/trueforge/values.yaml b/charts/truefoundry-utils/values.yaml
similarity index 61%
rename from charts/trueforge/values.yaml
rename to charts/truefoundry-utils/values.yaml
index 33e4fb4d6..329e8191a 100644
--- a/charts/trueforge/values.yaml
+++ b/charts/truefoundry-utils/values.yaml
@@ -1,9 +1,9 @@
-# Default values for the trueforge chart.
+# Default values for the truefoundry-utils chart.
replicaCount: 1
image:
- repository: tfy.jfrog.io/tfy-images/trueforge
+ repository: tfy.jfrog.io/tfy-images/truefoundry-utils
# Tag defaults to the chart appVersion when empty; the release workflow stamps
# the released version here.
tag: ""
@@ -24,24 +24,47 @@ podLabels: {}
podSecurityContext: {}
securityContext: {}
+# Optional PriorityClass for the server pods.
+priorityClassName: ""
+
+# Rolling update controls (omit keys you do not want to set).
+strategy: {}
+# strategy:
+# type: RollingUpdate
+# rollingUpdate:
+# maxUnavailable: 0
+# maxSurge: 1
+
service:
type: ClusterIP
port: 8790
+ annotations: {}
+ labels: {}
# Server runtime configuration. Keys map to environment variables read in
# packages/server/src/config.ts.
server:
# Container port the server listens on (PORT).
port: 8790
- # Public origin used for MCP OAuth callbacks (PUBLIC_BASE_URL). Required.
+ # Public origin for MCP OAuth / OIDC callbacks (PUBLIC_BASE_URL). Optional;
+ # empty string is injected as-is (distributed mode keeps it empty until set).
publicBaseUrl: ""
# Seconds the server is given to drain turns on SIGTERM (GRACEFUL_TIMEOUT_SECONDS).
gracefulTimeoutSeconds: 30
- # The server always runs peered (SINGLE_BINARY=false) against Postgres + Redis.
- # extraEnv/extraEnvFrom are escape hatches; extraEnv accepts
- # {name, value} or {name, valueFrom: {secretKeyRef: ...}}.
+ # The server always runs peered (STANDALONE=false) against Postgres + Redis.
+ # extraEnv/extraEnvFrom are escape hatches for OIDC and other knobs.
+ # extraEnv accepts {name, value} or {name, valueFrom: {secretKeyRef: ...}}.
extraEnv: []
+ # extraEnv:
+ # - name: OIDC_CLIENT_SECRET
+ # valueFrom:
+ # secretKeyRef:
+ # name: truefoundry-utils-oidc
+ # key: client-secret
extraEnvFrom: []
+ # extraEnvFrom:
+ # - secretRef:
+ # name: truefoundry-utils-oidc
# Bitnami relocated its versioned container images to docker.io/bitnamilegacy and
# left only rolling `latest` tags under docker.io/bitnami, so the subchart image
@@ -66,11 +89,11 @@ postgresql:
repository: tfy-mirror/bitnamilegacy/postgresql
tag: 17.6.0-debian-12-r4
auth:
- username: trueforge
- database: trueforge
+ username: truefoundry_utils
+ database: truefoundry_utils
# Dev default. In production set a strong password or reference a Secret via
# `existingSecret` (Bitnami reads the user password from key `password`).
- password: trueforge
+ password: truefoundry_utils
existingSecret: ""
primary:
persistence:
@@ -79,7 +102,8 @@ postgresql:
# --- Bundled Redis (Bitnami subchart) ------------------------------------------
# Rendered only when redis.enabled is true. Auth is disabled so REDIS_URL is a
-# plain redis://host:6379 the server can consume directly.
+# plain redis://host:6379 the server can consume directly. For passworded Redis,
+# disable the subchart and use externalRedis with a Secret.
redis:
enabled: true
architecture: standalone
@@ -99,8 +123,8 @@ redis:
externalPostgres:
host: ""
port: 5432
- database: trueforge
- user: trueforge
+ database: truefoundry_utils
+ user: truefoundry_utils
# Provide the password one of two ways:
# - set `password` and the chart renders a Secret, or
# - set `existingSecret` (+ `passwordKey`) to reference an existing Secret.
@@ -109,40 +133,61 @@ externalPostgres:
passwordKey: password
externalRedis:
- # Full connection URL, e.g. redis://redis-master.databases.svc:6379.
- # Required when redis.enabled is false (the server always needs Redis).
+ # Full connection URL, e.g. redis://:[email protected]:6379.
+ # Provide one of:
+ # - `url` (literal; fine for local/dev), or
+ # - `existingSecret` (+ `urlKey`) to reference an existing Secret.
url: ""
+ existingSecret: ""
+ urlKey: redis-url
# Extra raw manifests deployed alongside the server, e.g. an Istio
# VirtualService, a Gateway, an Ingress, or a NetworkPolicy. Each entry is a
# full Kubernetes object rendered through `tpl`, so Helm templating works and
-# helpers like `{{ include "trueforge.fullname" . }}` resolve. Example:
+# helpers like `{{ include "truefoundry-utils.fullname" . }}` resolve. Example:
#
# extraObjects:
# - apiVersion: networking.istio.io/v1
# kind: VirtualService
# metadata:
-# name: '{{ include "trueforge.fullname" . }}'
+# name: '{{ include "truefoundry-utils.fullname" . }}'
# spec:
# hosts:
-# - trueforge.example.com
+# - truefoundry-utils.example.com
# gateways:
# - istio-system/public-gateway
# http:
# - route:
# - destination:
-# host: '{{ include "trueforge.fullname" . }}'
+# host: '{{ include "truefoundry-utils.fullname" . }}'
# port:
# number: '{{ .Values.service.port }}'
extraObjects: []
+# Init containers and sidecar containers (full container specs).
+initContainers: []
+extraContainers: []
+
+# Extra volumes / mounts on the server container (e.g. CA bundles, projected tokens).
+extraVolumes: []
+extraVolumeMounts: []
+
resources: {}
+# startupProbe runs until success before liveness/readiness; sized for migrate + Redis connect.
+startupProbe:
+ httpGet:
+ path: /healthz
+ port: http
+ periodSeconds: 5
+ timeoutSeconds: 5
+ failureThreshold: 30
+
livenessProbe:
httpGet:
path: /healthz
port: http
- initialDelaySeconds: 15
+ initialDelaySeconds: 0
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
@@ -151,7 +196,7 @@ readinessProbe:
httpGet:
path: /healthz
port: http
- initialDelaySeconds: 5
+ initialDelaySeconds: 0
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
@@ -162,6 +207,14 @@ autoscaling:
maxReplicas: 5
targetCPUUtilizationPercentage: 80
+podDisruptionBudget:
+ enabled: false
+ # Exactly one of minAvailable or maxUnavailable is required when enabled.
+ # Default keeps at least one pod available during voluntary disruptions.
+ minAvailable: 1
+ maxUnavailable: ""
+
nodeSelector: {}
tolerations: []
affinity: {}
+topologySpreadConstraints: []
diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx
index 7c5d0cb56..79977b122 100644
--- a/docs/quickstart.mdx
+++ b/docs/quickstart.mdx
@@ -42,21 +42,20 @@ description: 'Run TrueForge with one command, configure a model provider, and ha
</Tab>
<Tab title="Kubernetes (Helm)">
- The Helm chart deploys the server with bundled Postgres and Redis (or point it at your own):
+ The Helm chart deploys the server in distributed mode with bundled Postgres and Redis (or point it at your own). No values are required for a basic install:
```bash
# TODO: replace <HELM_REPO> with the published Helm repo URL
- helm install trueforge oci://<HELM_REPO>/trueforge \
- --version <x.y.z> \
- --set server.publicBaseUrl=https://trueforge.example.com
+ helm install truefoundry-utils oci://<HELM_REPO>/truefoundry-utils \
+ --version <x.y.z>
```
- | Value | Default | Description |
- | ---------------------- | ------------ | ------------------------------------------------------------------------ |
- | `server.publicBaseUrl` | — (required) | Public origin for MCP OAuth callbacks. |
- | `replicaCount` | `1` | Number of server replicas (peered over Redis). |
- | `postgresql.enabled` | `true` | Bundle Postgres; set `false` + `externalPostgres.*` to bring your own. |
- | `redis.enabled` | `true` | Bundle Redis; set `false` + `externalRedis.url` to bring your own. |
+ | Value | Default | Description |
+ | ---------------------- | ------- | ------------------------------------------------------------------------ |
+ | `server.publicBaseUrl` | `""` | Public origin for MCP OAuth / OIDC callbacks; set once you expose the service. |
+ | `replicaCount` | `1` | Number of server replicas (peered over Redis). |
+ | `postgresql.enabled` | `true` | Bundle Postgres; set `false` + `externalPostgres.*` to bring your own. |
+ | `redis.enabled` | `true` | Bundle Redis; set `false` + `externalRedis.url` or `existingSecret`. |
</Tab>
</Tabs>
diff --git a/package.json b/package.json
index f9ca1e86f..455fd8ff6 100644
--- a/package.json
+++ b/package.json
@@ -32,10 +32,10 @@
"test:store:local": "bash scripts/test-store-local.sh",
"test": "pnpm --filter @truefoundry/utils-core test && pnpm --filter @truefoundry/trueforge-ui test && pnpm --filter @truefoundry/utils test && pnpm --filter frontend test",
"typecheck": "pnpm --filter @truefoundry/utils-core typecheck && pnpm --filter @truefoundry/trueforge-ui typecheck && pnpm --filter @truefoundry/utils typecheck && pnpm --filter frontend typecheck",
- "chart:deps": "helm dependency build charts/trueforge",
- "chart:lint": "helm lint charts/trueforge --values charts/trueforge/ci/lint-values.yaml",
- "chart:template": "helm template trueforge charts/trueforge --values charts/trueforge/ci/lint-values.yaml",
- "chart:package": "helm package charts/trueforge --destination dist"
+ "chart:deps": "helm dependency build charts/truefoundry-utils",
+ "chart:lint": "helm lint charts/truefoundry-utils --values charts/truefoundry-utils/ci/lint-values.yaml",
+ "chart:template": "helm template truefoundry-utils charts/truefoundry-utils --values charts/truefoundry-utils/ci/lint-values.yaml",
+ "chart:package": "helm package charts/truefoundry-utils --destination dist"
},
"devDependencies": {
"@eslint-react/eslint-plugin": "^5.18.0",
diff --git a/packages/server/.env.example b/packages/server/.env.example
index 0e47efb7d..e12bc78f6 100644
--- a/packages/server/.env.example
+++ b/packages/server/.env.example
@@ -75,7 +75,9 @@ REDIS_URL=redis://localhost:6379
# TURN_SUBSCRIBE_TIMEOUT_MS=600000
## PUBLIC_BASE_URL — origin of the fixed callback routes for server OIDC and
-## MCP OAuth/DCR. Optional; defaults to http://localhost:${PORT}.
+## MCP OAuth/DCR.
+## Standalone (STANDALONE=true): unset/blank → http://localhost:${PORT}.
+## Distributed (STANDALONE=false): unset/blank → empty; callbacks fail until set.
# PUBLIC_BASE_URL=http://localhost:8790
## ---------------------------------------------------------------------------
diff --git a/packages/server/src/auth/oidc.ts b/packages/server/src/auth/oidc.ts
index 1b2f4433a..f034dc3db 100644
--- a/packages/server/src/auth/oidc.ts
+++ b/packages/server/src/auth/oidc.ts
@@ -66,7 +66,11 @@ export async function initOidc(oidc: OIDCConfig | undefined): Promise<Configurat
}
function authCallbackUrl(): string {
- return `${configuration.PUBLIC_BASE_URL}${CALLBACK_PATH}`;
+ const publicBaseUrl = configuration.PUBLIC_BASE_URL;
+ if (publicBaseUrl === '') {
+ throw new Error('PUBLIC_BASE_URL is required for OIDC callbacks but was empty');
+ }
+ return `${publicBaseUrl}${CALLBACK_PATH}`;
}
/**
diff --git a/packages/server/src/config.ts b/packages/server/src/config.ts
index 1542521ba..4002f9914 100644
--- a/packages/server/src/config.ts
+++ b/packages/server/src/config.ts
@@ -212,13 +212,25 @@ function buildPostgresConnectionString(parts: {
return `postgres://${encodeURIComponent(parts.user)}:${encodeURIComponent(parts.password)}@${parts.host}:${String(parts.port)}/${encodeURIComponent(parts.database)}`;
}
-/** Defaults to `http://localhost:${PORT}` so local standalone boots without an env file. */
-function resolvePublicBaseUrl(port: number): string {
- const override = getEnv('PUBLIC_BASE_URL');
+/**
+ * Resolves `PUBLIC_BASE_URL` for callback origins (MCP OAuth / OIDC).
+ * - Non-empty env → that value (not trimmed).
+ * - Standalone + unset/blank → `http://localhost:${port}` so local boots without an env file.
+ * - Distributed + unset/blank → `""` (callbacks fail lazily until configured).
+ */
+export function resolvePublicBaseUrl(options: {
+ port: number;
+ standalone: boolean;
+ override: string | undefined;
+}): string {
+ const { port, standalone, override } = options;
if (override !== undefined && override.trim() !== '') {
return override;
}
- return `http://localhost:${String(port)}`;
+ if (standalone) {
+ return `http://localhost:${String(port)}`;
+ }
+ return '';
}
function resolveOIDCConfig(): OIDCConfig | undefined {
@@ -324,9 +336,11 @@ export interface SharedServerConfiguration {
/** Max milliseconds for an MCP transport connection. Env: `MCP_CONNECT_TIMEOUT_MS`. Default 30 seconds. */
MCP_CONNECT_TIMEOUT_MS: number;
/**
- * Public base URL of this server used as the origin of the MCP OAuth callback
- * (`{PUBLIC_BASE_URL}/api/v1/mcp-servers/oauth/callback`). Not trimmed.
- * Env: `PUBLIC_BASE_URL`. Default: `http://localhost:${PORT}`.
+ * Public base URL of this server used as the origin of MCP OAuth and OIDC
+ * callbacks. Not trimmed when non-empty.
+ * Env: `PUBLIC_BASE_URL`.
+ * Standalone default (unset/blank): `http://localhost:${PORT}`.
+ * Distributed (unset/blank): `""` — callbacks fail until set.
*/
PUBLIC_BASE_URL: string;
/**
@@ -466,7 +480,11 @@ const shared: SharedServerConfiguration = {
SKILL_CATALOG_PATH: resolveOptionalPathEnv('SKILL_CATALOG_PATH'),
SANDBOX_CATALOG_PATH: resolveOptionalPathEnv('SANDBOX_CATALOG_PATH'),
FRONTEND_DIR: resolveFrontendDir(),
- PUBLIC_BASE_URL: resolvePublicBaseUrl(port),
+ PUBLIC_BASE_URL: resolvePublicBaseUrl({
+ port,
+ standalone,
+ override: getEnv('PUBLIC_BASE_URL'),
+ }),
MCP_REQUEST_TIMEOUT_MS: parsePositiveInt({
envKey: 'MCP_REQUEST_TIMEOUT_MS',
diff --git a/packages/server/tests/unit/config/resolvePublicBaseUrl.test.ts b/packages/server/tests/unit/config/resolvePublicBaseUrl.test.ts
new file mode 100644
index 000000000..3ba0b7703
--- /dev/null
+++ b/packages/server/tests/unit/config/resolvePublicBaseUrl.test.ts
@@ -0,0 +1,42 @@
+import { resolvePublicBaseUrl } from '../../../src/config';
+
+describe('resolvePublicBaseUrl', () => {
+ it('returns a non-empty override in either mode', () => {
+ expect(
+ resolvePublicBaseUrl({
+ port: 8790,
+ standalone: true,
+ override: 'https://example.com',
+ }),
+ ).toBe('https://example.com');
+ expect(
+ resolvePublicBaseUrl({
+ port: 8790,
+ standalone: false,
+ override: 'https://example.com',
+ }),
+ ).toBe('https://example.com');
+ });
+
+ it('does not trim a non-empty override', () => {
+ expect(
+ resolvePublicBaseUrl({
+ port: 8790,
+ standalone: false,
+ override: 'https://example.com/',
+ }),
+ ).toBe('https://example.com/');
+ });
+
+ it('falls back to localhost in standalone when unset or blank', () => {
+ expect(resolvePublicBaseUrl({ port: 8790, standalone: true, override: undefined })).toBe('http://localhost:8790');
+ expect(resolvePublicBaseUrl({ port: 8790, standalone: true, override: '' })).toBe('http://localhost:8790');
+ expect(resolvePublicBaseUrl({ port: 3000, standalone: true, override: ' ' })).toBe('http://localhost:3000');
+ });
+
+ it('keeps empty string in distributed when unset or blank', () => {
+ expect(resolvePublicBaseUrl({ port: 8790, standalone: false, override: undefined })).toBe('');
+ expect(resolvePublicBaseUrl({ port: 8790, standalone: false, override: '' })).toBe('');
+ expect(resolvePublicBaseUrl({ port: 8790, standalone: false, override: ' ' })).toBe('');
+ });
+});