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