From 27d9d9c436ab66ce20c907f9a075c1fa9953fadb Mon Sep 17 00:00:00 2001 From: Will Anderson Date: Tue, 14 Apr 2026 08:45:21 -0500 Subject: [PATCH] fornax: fix crash-looping coordinator, add UI deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix liveness/readiness probe paths from /api/v2/app/version (qBittorrent) to /health and /health/ready (Fornax Express server). Pod was restarting every ~30s due to probe failures against wrong endpoint. - Add fornax-ui deployment and service for React dashboard (image: fornax/ui:latest, nginx on port 80) - Split ingress: /api and /health → coordinator:3000, / → ui:80 - Update kustomization to include UI resources --- .../k8s/fornax/coordinator/deployment.yaml | 8 ++-- .../k8s/fornax/coordinator/ingress.yaml | 18 +++++++- servers/legion/k8s/fornax/kustomization.yaml | 2 + servers/legion/k8s/fornax/ui/deployment.yaml | 43 +++++++++++++++++++ .../legion/k8s/fornax/ui/kustomization.yaml | 5 +++ servers/legion/k8s/fornax/ui/service.yaml | 15 +++++++ 6 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 servers/legion/k8s/fornax/ui/deployment.yaml create mode 100644 servers/legion/k8s/fornax/ui/kustomization.yaml create mode 100644 servers/legion/k8s/fornax/ui/service.yaml diff --git a/servers/legion/k8s/fornax/coordinator/deployment.yaml b/servers/legion/k8s/fornax/coordinator/deployment.yaml index 3d6ac72..06ffae2 100644 --- a/servers/legion/k8s/fornax/coordinator/deployment.yaml +++ b/servers/legion/k8s/fornax/coordinator/deployment.yaml @@ -39,13 +39,15 @@ spec: memory: 512Mi livenessProbe: httpGet: - path: /api/v2/app/version + path: /health port: http - initialDelaySeconds: 15 + initialDelaySeconds: 10 periodSeconds: 30 + failureThreshold: 3 readinessProbe: httpGet: - path: /api/v2/app/version + path: /health/ready port: http initialDelaySeconds: 5 periodSeconds: 10 + failureThreshold: 3 diff --git a/servers/legion/k8s/fornax/coordinator/ingress.yaml b/servers/legion/k8s/fornax/coordinator/ingress.yaml index a027b19..c707da1 100644 --- a/servers/legion/k8s/fornax/coordinator/ingress.yaml +++ b/servers/legion/k8s/fornax/coordinator/ingress.yaml @@ -16,10 +16,26 @@ spec: - host: fornax.neuralplatform.ai http: paths: - - path: / + # API and health routes go to the Express backend + - path: /api pathType: Prefix backend: service: name: fornax-coordinator port: number: 3000 + - path: /health + pathType: Prefix + backend: + service: + name: fornax-coordinator + port: + number: 3000 + # Everything else (/, /assets, etc.) goes to the React UI + - path: / + pathType: Prefix + backend: + service: + name: fornax-ui + port: + number: 80 diff --git a/servers/legion/k8s/fornax/kustomization.yaml b/servers/legion/k8s/fornax/kustomization.yaml index b5ddea8..a2912af 100644 --- a/servers/legion/k8s/fornax/kustomization.yaml +++ b/servers/legion/k8s/fornax/kustomization.yaml @@ -6,3 +6,5 @@ resources: - coordinator/deployment.yaml - coordinator/service.yaml - coordinator/ingress.yaml + - ui/deployment.yaml + - ui/service.yaml diff --git a/servers/legion/k8s/fornax/ui/deployment.yaml b/servers/legion/k8s/fornax/ui/deployment.yaml new file mode 100644 index 0000000..0fcac30 --- /dev/null +++ b/servers/legion/k8s/fornax/ui/deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: fornax-ui + namespace: media + labels: + app: fornax-ui +spec: + replicas: 1 + selector: + matchLabels: + app: fornax-ui + template: + metadata: + labels: + app: fornax-ui + spec: + containers: + - name: ui + image: registry.neuralplatform.ai/fornax/ui:latest + imagePullPolicy: Always + ports: + - containerPort: 80 + name: http + resources: + requests: + cpu: 10m + memory: 32Mi + limits: + cpu: 100m + memory: 128Mi + livenessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 5 + periodSeconds: 30 + readinessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 3 + periodSeconds: 10 diff --git a/servers/legion/k8s/fornax/ui/kustomization.yaml b/servers/legion/k8s/fornax/ui/kustomization.yaml new file mode 100644 index 0000000..a33121c --- /dev/null +++ b/servers/legion/k8s/fornax/ui/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - deployment.yaml + - service.yaml diff --git a/servers/legion/k8s/fornax/ui/service.yaml b/servers/legion/k8s/fornax/ui/service.yaml new file mode 100644 index 0000000..b0326e5 --- /dev/null +++ b/servers/legion/k8s/fornax/ui/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: fornax-ui + namespace: media + labels: + app: fornax-ui +spec: + selector: + app: fornax-ui + ports: + - name: http + port: 80 + targetPort: 80 + type: ClusterIP