Files
infrastructure/servers/legion/k8s/neuron-technologies/swarm/mcp-deployment-beta.yaml
T
Will Anderson 74dd054a36 feat(swarm): add swarm self-improvement loop infrastructure
Adds complete k8s manifests, ArgoCD app, and Terraform namespace
resources for the Neuron swarm self-improvement loop system.

Each variant (alpha, beta, gamma) gets its own isolated namespace,
PVC, MCP/REST deployments, ExternalSecrets from Vault, RBAC for CI,
and a SQLite clone Job template for session startup.
2026-04-26 00:58:43 -05:00

121 lines
3.5 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: neuron-mcp
namespace: swarm-beta
labels:
app: neuron-mcp
env: swarm
variant: beta
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: neuron-mcp
template:
metadata:
labels:
app: neuron-mcp
env: swarm
variant: beta
spec:
terminationGracePeriodSeconds: 30
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
initContainers:
- name: wait-for-sqlite-clone
image: busybox:1.36
command: ["sh", "-c", "until [ -f /data/neuron.db ]; do echo 'waiting for SQLite clone...'; sleep 2; done; echo 'SQLite ready'"]
volumeMounts:
- name: data
mountPath: /data
securityContext:
runAsNonRoot: true
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
containers:
- name: neuron-mcp
image: registry.neuralplatform.ai/neuron-technologies/neuron-mcp:v0.15.3
imagePullPolicy: Always
ports:
- name: http
containerPort: 8080
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
runAsNonRoot: true
capabilities:
drop: ["ALL"]
env:
- name: NEURON_SWARM_VARIANT
value: "beta"
- name: NEURON_SWARM_SESSION
valueFrom:
configMapKeyRef:
name: swarm-beta-session
key: session_id
optional: true
- name: NEURON_SWARM_GOAL
valueFrom:
configMapKeyRef:
name: swarm-beta-session
key: goal
optional: true
- name: NEURON_SWARM_LOOP_MAX
valueFrom:
configMapKeyRef:
name: swarm-beta-session
key: loop_max
optional: true
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "http://alloy-otlp.monitoring.svc.cluster.local:4318"
- name: JAVA_TOOL_OPTIONS
value: "-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0 -XX:+ExitOnOutOfMemoryError"
envFrom:
- configMapRef:
name: swarm-beta-config
- secretRef:
name: swarm-beta-secrets
volumeMounts:
- name: data
mountPath: /data
resources:
requests:
cpu: 250m
memory: 512Mi
limits:
cpu: 1500m
memory: 1536Mi
lifecycle:
preStop:
exec:
command: ["sh", "-c", "sleep 5"]
startupProbe:
httpGet:
path: /actuator/health/liveness
port: http
failureThreshold: 30
periodSeconds: 5
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: http
periodSeconds: 30
failureThreshold: 3
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: http
initialDelaySeconds: 5
periodSeconds: 10
failureThreshold: 3
volumes:
- name: data
persistentVolumeClaim:
claimName: swarm-beta-data