Skip to content

Commit 89d7e4c

Browse files
committed
fix(supervisor,helm): validate the cell name in the chart and give the attempt-start test its own port
1 parent 637eec3 commit 89d7e4c

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/supervisor/src/workloadServer/workloadServer.attemptStart.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ vi.mock("std-env", () => ({
1212

1313
const { WorkloadServer } = await import("./index.js");
1414

15-
const PORT = 18733;
15+
const PORT = 18734;
1616
const BASE = `http://127.0.0.1:${PORT}`;
1717

1818
const startRunAttempt = vi.fn(async () => ({

‎hosting/k8s/helm/templates/supervisor.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ spec:
180180
fieldRef:
181181
fieldPath: spec.nodeName
182182
{{- if .Values.supervisor.config.cellName }}
183+
{{- if not (regexMatch "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$" .Values.supervisor.config.cellName) }}
184+
{{- fail "supervisor.config.cellName must be 1-64 characters of letters, digits, dots, underscores or dashes, starting with a letter or digit. The supervisor refuses anything else at boot." }}
185+
{{- end }}
183186
- name: TRIGGER_WORKER_CELL_NAME
184187
value: {{ .Values.supervisor.config.cellName | quote }}
185188
{{- end }}

0 commit comments

Comments
 (0)