Skip to content

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

helm: Fix full names on server resources (#777)

Chirag Jainccaaaf3d6e6b
diff --git a/charts/trueforge/README.md b/charts/trueforge/README.md
index 64c6e9e0d..6a11f3c5f 100644
--- a/charts/trueforge/README.md
+++ b/charts/trueforge/README.md
@@ -305,7 +305,7 @@ extraObjects:
- apiVersion: networking.istio.io/v1
kind: VirtualService
metadata:
- name: '{{ include "trueforge.fullname" . }}'
+ name: '{{ include "trueforge.server.fullname" . }}'
spec:
hosts:
- trueforge.example.com
@@ -314,7 +314,7 @@ extraObjects:
http:
- route:
- destination:
- host: '{{ include "trueforge.fullname" . }}'
+ host: '{{ include "trueforge.server.fullname" . }}'
port:
number: '{{ .Values.service.port }}'
```
@@ -338,7 +338,7 @@ extraObjects:
| `service.port` | `8790` | Service port. |
| `server.port` | `8790` | Container port (`PORT`). |
| `autoscaling.enabled` | `false` | Enable a HorizontalPodAutoscaler. |
-| `podDisruptionBudget.enabled` | `true` | PodDisruptionBudget (`minAvailable` defaults to `1`); rendered only when the server runs more than one replica. |
+| `podDisruptionBudget.enabled` | `true` | Server 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. |
@@ -373,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.
-- Run multiple replicas (`server.replicaCount` or a `resourceTier` of `medium`/`large`); the PodDisruptionBudget (`minAvailable: 1`) then applies automatically.
+- Run multiple replicas (`server.replicaCount` or a `resourceTier` of `medium`/`large`); the server PodDisruptionBudget (`{release}-trueforge-server`, `minAvailable: 1`) then applies automatically.
diff --git a/charts/trueforge/templates/NOTES.txt b/charts/trueforge/templates/NOTES.txt
index ff01cb491..13e1114df 100644
--- a/charts/trueforge/templates/NOTES.txt
+++ b/charts/trueforge/templates/NOTES.txt
@@ -3,10 +3,10 @@ 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 }}
+ http://{{ include "trueforge.server.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 }}
+ kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ include "trueforge.server.fullname" . }} 8790:{{ .Values.service.port }}
Then open http://localhost:8790 and check http://localhost:8790/healthz.
diff --git a/charts/trueforge/templates/_helpers.tpl b/charts/trueforge/templates/_helpers.tpl
index 9c733e1c6..e23acfe06 100644
--- a/charts/trueforge/templates/_helpers.tpl
+++ b/charts/trueforge/templates/_helpers.tpl
@@ -22,6 +22,24 @@ itself contains "trueforge".
{{- end }}
{{- end }}
+{{/*
+Server object name derived from trueforge.fullname (`{fullname}-server`).
+The base is trimmed to leave room for the suffix, so it survives the 63
+character limit; truncating after appending would collapse the server and
+controller names onto each other for long release names.
+*/}}
+{{- define "trueforge.server.fullname" -}}
+{{- printf "%s-server" (include "trueforge.fullname" . | trunc 56 | trimSuffix "-") }}
+{{- end }}
+
+{{/*
+Controller Deployment name (`{fullname}-controller`), truncated the same way
+as trueforge.server.fullname so the suffix always survives.
+*/}}
+{{- define "trueforge.controller.fullname" -}}
+{{- printf "%s-controller" (include "trueforge.fullname" . | trunc 52 | trimSuffix "-") }}
+{{- end }}
+
{{/*
Chart name and version as used by the chart label.
*/}}
@@ -106,7 +124,7 @@ server Service when controller.serverUrl is empty (https when mtls is enabled).
{{- if .Values.controller.serverUrl -}}
{{- .Values.controller.serverUrl -}}
{{- else -}}
-{{- printf "%s://%s:%v" (ternary "https" "http" .Values.mtls.enabled) (include "trueforge.fullname" .) .Values.service.port -}}
+{{- printf "%s://%s:%v" (ternary "https" "http" .Values.mtls.enabled) (include "trueforge.server.fullname" .) .Values.service.port -}}
{{- end -}}
{{- end }}
diff --git a/charts/trueforge/templates/controller-deployment.yaml b/charts/trueforge/templates/controller-deployment.yaml
index bc1c267d3..50238c894 100644
--- a/charts/trueforge/templates/controller-deployment.yaml
+++ b/charts/trueforge/templates/controller-deployment.yaml
@@ -2,7 +2,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
- name: {{ include "trueforge.fullname" . }}-controller
+ name: {{ include "trueforge.controller.fullname" . }}
labels:
{{- include "trueforge.controller.labels" . | nindent 4 }}
{{- with (mergeOverwrite (include "trueforge.annotations" . | fromYaml) (deepCopy .Values.controller.deploymentAnnotations)) }}
diff --git a/charts/trueforge/templates/deployment.yaml b/charts/trueforge/templates/deployment.yaml
index 13597322c..fa3fbfcf8 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" . }}-server
+ name: {{ include "trueforge.server.fullname" . }}
labels:
{{- include "trueforge.labels" . | nindent 4 }}
{{- with (mergeOverwrite (include "trueforge.annotations" . | fromYaml) (deepCopy .Values.server.deploymentAnnotations)) }}
diff --git a/charts/trueforge/templates/hpa.yaml b/charts/trueforge/templates/hpa.yaml
index 43c4590ea..4f177db2b 100644
--- a/charts/trueforge/templates/hpa.yaml
+++ b/charts/trueforge/templates/hpa.yaml
@@ -2,7 +2,7 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
- name: {{ include "trueforge.fullname" . }}
+ name: {{ include "trueforge.server.fullname" . }}
labels:
{{- include "trueforge.labels" . | nindent 4 }}
{{- with (include "trueforge.annotations" .) }}
@@ -13,7 +13,7 @@ spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
- name: {{ include "trueforge.fullname" . }}-server
+ name: {{ include "trueforge.server.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
diff --git a/charts/trueforge/templates/pdb.yaml b/charts/trueforge/templates/pdb.yaml
index 74d770a85..93aaead06 100644
--- a/charts/trueforge/templates/pdb.yaml
+++ b/charts/trueforge/templates/pdb.yaml
@@ -14,7 +14,7 @@ fixed count. A PDB over a single replica would block node drains. */}}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
- name: {{ include "trueforge.fullname" . }}
+ name: {{ include "trueforge.server.fullname" . }}
labels:
{{- include "trueforge.labels" . | nindent 4 }}
{{- with (include "trueforge.annotations" .) }}
diff --git a/charts/trueforge/templates/service.yaml b/charts/trueforge/templates/service.yaml
index cf2b6cb0e..8f62985aa 100644
--- a/charts/trueforge/templates/service.yaml
+++ b/charts/trueforge/templates/service.yaml
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ include "trueforge.fullname" . }}
+ name: {{ include "trueforge.server.fullname" . }}
labels:
{{- include "trueforge.labels" . | nindent 4 }}
{{- with .Values.service.labels }}
diff --git a/charts/trueforge/values.yaml b/charts/trueforge/values.yaml
index 3e9c3bc02..78a78339f 100644
--- a/charts/trueforge/values.yaml
+++ b/charts/trueforge/values.yaml
@@ -268,13 +268,13 @@ externalRedis:
# 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 "trueforge.server.fullname" . }}` resolve. Example:
#
# extraObjects:
# - apiVersion: networking.istio.io/v1
# kind: VirtualService
# metadata:
-# name: '{{ include "trueforge.fullname" . }}'
+# name: '{{ include "trueforge.server.fullname" . }}'
# spec:
# hosts:
# - trueforge.example.com
@@ -283,7 +283,7 @@ externalRedis:
# http:
# - route:
# - destination:
-# host: '{{ include "trueforge.fullname" . }}'
+# host: '{{ include "trueforge.server.fullname" . }}'
# port:
# number: '{{ .Values.service.port }}'
extraObjects: []