Files
infrastructure/servers/legion/k8s/neuron-technologies/prod/services.yaml
T
Will Anderson f86ee04467 fix(neuron-mcp): blue/green deployment, memory limits, preStop drain hook
- Rename Deployment to neuron-mcp-blue with slot=blue label
- Add neuron-mcp-green Deployment scaffold (replicas=0, ready to receive new image)
- Service selector now routes by slot label; annotation tracks active slot
- Memory: 768Mi → 1536Mi limit, 256Mi → 512Mi request (fixes OOM pod restarts / 502s)
- Add JAVA_TOOL_OPTIONS: container-aware GC + ExitOnOutOfMemoryError
- Add preStop sleep 8s so Traefik drains in-flight connections before pod terminates
- terminationGracePeriodSeconds: 30
- Add scripts/blue-green-deploy.sh: automated slot-swap with health check and rollback
2026-04-24 22:08:12 -05:00

53 lines
963 B
YAML

apiVersion: v1
kind: Service
metadata:
name: neuron-license
namespace: neuron-prod
labels:
app: neuron-license
spec:
selector:
app: neuron-license
ports:
- name: http
port: 8082
targetPort: 8082
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
name: neuron-mcp
namespace: neuron-prod
labels:
app: neuron-mcp
annotations:
# Blue/green: change slot to "green" then back to "blue" to switch traffic.
# Process: deploy green → verify health → patch this selector → scale blue to 0.
neuron.ai/active-slot: "blue"
spec:
selector:
app: neuron-mcp
slot: blue
ports:
- name: http
port: 8080
targetPort: 8080
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
name: neuron-rest
namespace: neuron-prod
labels:
app: neuron-rest
spec:
selector:
app: neuron-rest
ports:
- name: http
port: 8081
targetPort: 8081
type: ClusterIP