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
This commit is contained in:
@@ -21,9 +21,14 @@ metadata:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user