Skip to content

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

parent changes: rename trueforge to trueforge-server (#752)

Raman Tehlan2ec47e419c57
diff --git a/charts/trueforge/README.md b/charts/trueforge/README.md
index c9721851e..64c6e9e0d 100644
--- a/charts/trueforge/README.md
+++ b/charts/trueforge/README.md
@@ -151,17 +151,18 @@ The chart's own value wins on conflict; `tolerations` append to
## Resource tiers
`resourceTier` (`small` / `medium` / `large`) selects sizing presets for the
-server and the controller. When set, it **replaces** the `resources` tables
-(replica counts stay as set: server `replicaCount`, controller always 1); an
-unknown tier fails the render. Empty (the default) keeps the explicit
-`resources` / `controller.resources`. A parent chart may set
-`global.resourceTier` instead; the chart's own `resourceTier` wins.
-
-| Preset | Server requests | Controller requests |
-| --- | --- | --- |
-| `small` | 50m / 128Mi | 50m / 128Mi |
-| `medium` | 100m / 256Mi | 100m / 256Mi |
-| `large` | 500m / 512Mi | 500m / 512Mi |
+server and the controller, and sets the server replica count (an explicit
+`server.replicaCount` overrides it; the controller is always 1 replica). When
+set, it **replaces** the `resources` tables; an unknown tier fails the render.
+Empty (the default) keeps the explicit `resources` / `controller.resources`
+and 1 server replica. A parent chart may set `global.resourceTier` instead;
+the chart's own `resourceTier` wins.
+
+| Preset | Server replicas | Server requests | Controller requests |
+| --- | --- | --- | --- |
+| `small` | 1 | 50m / 128Mi | 50m / 128Mi |
+| `medium` | 2 | 100m / 256Mi | 100m / 256Mi |
+| `large` | 3 | 500m / 512Mi | 500m / 512Mi |
## Postgres
@@ -322,8 +323,8 @@ extraObjects:
| Value | Default | Description |
| --------------------- | ----------------------------------- | ------------------------------------- |
-| `resourceTier` | `""` | Optional `small` / `medium` / `large` sizing preset; empty uses `resources`. |
-| `server.replicaCount` | `1` | Number of server replicas. |
+| `resourceTier` | `""` | Optional `small` / `medium` / `large` preset for resources and server replicas; empty uses `resources`. |
+| `server.replicaCount` | `""` | Number of server replicas. Empty derives from the resource tier (small=1, medium=2, large=3; 1 with no tier). |
| `server.deploymentAnnotations` | `{}` | Annotations on the server Deployment, such as an Argo CD sync wave. |
| `controller.deploymentAnnotations` | `{}` | Annotations on the controller Deployment, such as an Argo CD sync wave. |
| `image.repository` | `tfy.jfrog.io/tfy-images/trueforge` | Image repository. |
@@ -337,7 +338,7 @@ extraObjects:
| `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`). |
+| `podDisruptionBudget.enabled` | `true` | PodDisruptionBudget (`minAvailable` defaults to `1`); rendered only when the server runs more than one replica. |
| `podSecurityContext` | non-root UID/GID `10001` | Pod-level restricted security defaults. |
| `securityContext` | read-only root FS + drop all capabilities | Container-level restricted security defaults. |
| `resources` | 100m/256Mi requests, 200m/512Mi limits | Server CPU, memory, and ephemeral-storage. Replaced when a resourceTier is set. |
@@ -348,10 +349,13 @@ extraObjects:
The server uses a RollingUpdate strategy by default (`server.strategy`); the
controller is fixed to a single replica with `Recreate` and exposes neither.
-Also available (defaults inert): `priorityClassName`,
-`topologySpreadConstraints`, `initContainers`, `extraContainers`,
-`extraVolumes`, `extraVolumeMounts`, `service.annotations`, `service.labels`,
-`startupProbe`.
+Server pods spread across nodes by default (`maxSkew: 1`,
+`whenUnsatisfiable: ScheduleAnyway`); set `topologySpreadConstraints` to
+override (entries apply verbatim to both server and controller pods).
+
+Also available (defaults inert): `priorityClassName`, `initContainers`,
+`extraContainers`, `extraVolumes`, `extraVolumeMounts`, `service.annotations`,
+`service.labels`, `startupProbe`.
The server container mounts an `emptyDir` at `/tmp` by default so the image can
run with `readOnlyRootFilesystem: true`. When set, `resources.limits.ephemeral-storage`
@@ -369,4 +373,4 @@ also sets the `/tmp` `emptyDir.sizeLimit`.
- If enabling `mtls`, set `mtls.secretName` and ensure any reverse proxy dials HTTPS with a trusted client cert (see Caddy `internal_mtls`).
- Tune container `resources` (especially CPU requests) before enabling HPA.
- Default `tfy.jfrog.io` images and the Helm chart are anonymously pullable — set `imagePullSecrets` only if you override to a private registry.
-- Enable `podDisruptionBudget` when running multiple replicas (defaults to `minAvailable: 1`; set exactly one of `minAvailable` or `maxUnavailable`).
+- Run multiple replicas (`server.replicaCount` or a `resourceTier` of `medium`/`large`); the PodDisruptionBudget (`minAvailable: 1`) then applies automatically.
diff --git a/charts/trueforge/templates/_helpers.tpl b/charts/trueforge/templates/_helpers.tpl
index 643029cd5..9c733e1c6 100644
--- a/charts/trueforge/templates/_helpers.tpl
+++ b/charts/trueforge/templates/_helpers.tpl
@@ -232,8 +232,24 @@ chart's global.resourceTier.
{{- end -}}
{{- end }}
+{{/*
+Server replica count. An explicit server.replicaCount wins; otherwise the
+resource tier decides (small=1, medium=2, large=3), falling back to 1 when no
+tier is set.
+*/}}
{{- define "trueforge.replicas" -}}
+{{- $tier := include "trueforge.resourceTier" . | trim -}}
+{{- if .Values.server.replicaCount -}}
{{- .Values.server.replicaCount -}}
+{{- else if eq $tier "small" -}}
+1
+{{- else if eq $tier "medium" -}}
+2
+{{- else if eq $tier "large" -}}
+3
+{{- else -}}
+1
+{{- end -}}
{{- end }}
{{- define "trueforge.defaultResources.small" -}}
diff --git a/charts/trueforge/templates/deployment.yaml b/charts/trueforge/templates/deployment.yaml
index 91090a839..13597322c 100644
--- a/charts/trueforge/templates/deployment.yaml
+++ b/charts/trueforge/templates/deployment.yaml
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
- name: {{ include "trueforge.fullname" . }}
+ name: {{ include "trueforge.fullname" . }}-server
labels:
{{- include "trueforge.labels" . | nindent 4 }}
{{- with (mergeOverwrite (include "trueforge.annotations" . | fromYaml) (deepCopy .Values.server.deploymentAnnotations)) }}
@@ -57,7 +57,7 @@ spec:
{{- end }}
{{- end }}
containers:
- - name: server
+ - name: trueforge-server
image: {{ include "trueforge.image" . | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.securityContext }}
@@ -120,7 +120,14 @@ spec:
tolerations:
{{- . | nindent 8 }}
{{- end }}
- {{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
+ {{- with .Values.topologySpreadConstraints }}
{{- toYaml . | nindent 8 }}
- {{- end }}
+ {{- else }}
+ - maxSkew: 1
+ topologyKey: kubernetes.io/hostname
+ whenUnsatisfiable: ScheduleAnyway
+ labelSelector:
+ matchLabels:
+ {{- include "trueforge.selectorLabels" . | nindent 14 }}
+ {{- end }}
diff --git a/charts/trueforge/templates/hpa.yaml b/charts/trueforge/templates/hpa.yaml
index a2b0cfa9f..43c4590ea 100644
--- a/charts/trueforge/templates/hpa.yaml
+++ b/charts/trueforge/templates/hpa.yaml
@@ -13,7 +13,7 @@ spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
- name: {{ include "trueforge.fullname" . }}
+ name: {{ include "trueforge.fullname" . }}-server
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
diff --git a/charts/trueforge/templates/pdb.yaml b/charts/trueforge/templates/pdb.yaml
index b3095b6da..74d770a85 100644
--- a/charts/trueforge/templates/pdb.yaml
+++ b/charts/trueforge/templates/pdb.yaml
@@ -1,4 +1,7 @@
-{{- if .Values.podDisruptionBudget.enabled }}
+{{- /* Guard on the guaranteed floor: minReplicas under autoscaling, else the
+fixed count. A PDB over a single replica would block node drains. */}}
+{{- $replicas := ternary .Values.autoscaling.minReplicas (include "trueforge.replicas" . | int) .Values.autoscaling.enabled | int }}
+{{- if and .Values.podDisruptionBudget.enabled (gt $replicas 1) }}
{{- /* 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 }}
diff --git a/charts/trueforge/values.yaml b/charts/trueforge/values.yaml
index bcc7b1cb7..0462d5f84 100644
--- a/charts/trueforge/values.yaml
+++ b/charts/trueforge/values.yaml
@@ -1,4 +1,41 @@
# Default values for the trueforge chart.
+# Bitnami relocated its versioned container images to docker.io/bitnamilegacy and
+# left only rolling `latest` tags under docker.io/bitnami, so the subchart image
+# defaults no longer pull. We source pinned legacy images from the TrueFoundry
+# JFrog mirror instead. Overriding the registry trips Bitnami's image guardrail,
+# so allowInsecureImages must be set for the subcharts to render.
+global:
+ resourceTier: ""
+ security:
+ allowInsecureImages: true
+ # Custom CA trust, set here or inherited from a parent chart. Give an inline
+ # `certificate` or an `existingConfigMap.name` (key `ca-certificates.crt`);
+ # mounted over /etc/ssl/certs (overrideCAList) or merged with the system
+ # bundle by an initContainer. Sets NODE_EXTRA_CA_CERTS either way.
+ customCA:
+ enabled: false
+ certificate: ""
+ existingConfigMap:
+ name: ""
+ overrideCAList: false
+ image:
+ registry: tfy.jfrog.io
+ repository: tfy-mirror/alpine
+ tag: "3.21"
+ securityContext:
+ runAsNonRoot: true
+ runAsUser: 1001
+ runAsGroup: 1001
+ readOnlyRootFilesystem: true
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop:
+ - ALL
+ # Extra env for the initContainer only, e.g. SSL_CERT_FILE, REQUESTS_CA_BUNDLE.
+ env: {}
+ emptyDir:
+ sslCerts:
+ sizeLimit: 10Mi
image:
repository: tfy.jfrog.io/tfy-images/trueforge
@@ -48,7 +85,9 @@ service:
# packages/trueforge/src/config.ts.
server:
# Number of server replicas (ignored when autoscaling.enabled is true).
- replicaCount: 1
+ # null = derived from the resource tier (small=1, medium=2, large=3),
+ # or 1 when no tier is set. Set a number to override the tier.
+ replicaCount: null
# Annotations on the server Deployment object (for example, Argo CD sync waves).
deploymentAnnotations: {}
# Rolling update strategy for the server Deployment.
@@ -132,42 +171,6 @@ configs:
# Optional comma-separated exact emails and/or * globs (e.g. "*@company.com").
# Empty = unrestricted. Matched against the ID token `email` claim.
allowedEmails: ""
-# Bitnami relocated its versioned container images to docker.io/bitnamilegacy and
-# left only rolling `latest` tags under docker.io/bitnami, so the subchart image
-# defaults no longer pull. We source pinned legacy images from the TrueFoundry
-# JFrog mirror instead. Overriding the registry trips Bitnami's image guardrail,
-# so allowInsecureImages must be set for the subcharts to render.
-global:
- security:
- allowInsecureImages: true
- # Custom CA trust, set here or inherited from a parent chart. Give an inline
- # `certificate` or an `existingConfigMap.name` (key `ca-certificates.crt`);
- # mounted over /etc/ssl/certs (overrideCAList) or merged with the system
- # bundle by an initContainer. Sets NODE_EXTRA_CA_CERTS either way.
- customCA:
- enabled: false
- certificate: ""
- existingConfigMap:
- name: ""
- overrideCAList: false
- image:
- registry: tfy.jfrog.io
- repository: tfy-mirror/alpine
- tag: "3.21"
- securityContext:
- runAsNonRoot: true
- runAsUser: 1001
- runAsGroup: 1001
- readOnlyRootFilesystem: true
- allowPrivilegeEscalation: false
- capabilities:
- drop:
- - ALL
- # Extra env for the initContainer only, e.g. SSL_CERT_FILE, REQUESTS_CA_BUNDLE.
- env: {}
- emptyDir:
- sslCerts:
- sizeLimit: 10Mi
# Resource tier: small | medium | large presets for server and controller.
# Empty = use `resources` / `controller.resources`. Wins over a parent chart's
# global.resourceTier.
@@ -261,6 +264,7 @@ externalRedis:
masterName: ""
# string or valueFrom -> REDIS_SENTINEL_PASSWORD.
password: ""
+
# 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
@@ -335,7 +339,9 @@ autoscaling:
maxReplicas: 5
targetCPUUtilizationPercentage: 80
podDisruptionBudget:
- enabled: false
+ # Rendered only when the server runs more than one replica, so single-replica
+ # installs never block node drains.
+ enabled: true
# Exactly one of minAvailable or maxUnavailable is required when enabled.
# Default keeps at least one pod available during voluntary disruptions.
minAvailable: 1
@@ -343,4 +349,6 @@ podDisruptionBudget:
nodeSelector: {}
tolerations: []
affinity: {}
+# Empty = server pods spread across nodes (maxSkew 1, ScheduleAnyway). Set to
+# override; entries apply verbatim to both server and controller pods.
topologySpreadConstraints: []