diff --git a/servers/legion/apps/neuron-alpha.yaml b/servers/legion/apps/neuron-alpha.yaml new file mode 100644 index 0000000..3b49f92 --- /dev/null +++ b/servers/legion/apps/neuron-alpha.yaml @@ -0,0 +1,89 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: neuron-alpha + namespace: neuron + labels: + app: neuron-alpha +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app: neuron-alpha + template: + metadata: + labels: + app: neuron-alpha + spec: + containers: + - name: neuron + image: registry.neuralplatform.ai/neural-platform/neuron:latest + imagePullPolicy: Always + command: + - bash + - -c + - mkdir -p /root/.neuron && ln -sf /data/neuron.db /root/.neuron/neuron.db && python -m synapse platform serve --mcp-host 0.0.0.0 --mcp-port 8001 --webhook-port 3847 + ports: + - name: mcp + containerPort: 8001 + - name: webhook + containerPort: 3847 + envFrom: + - configMapRef: + name: neuron-config + - secretRef: + name: neuron-secrets + volumeMounts: + - name: data + mountPath: /data + - name: app-config + mountPath: /app/config/default.yaml + subPath: default.yaml + resources: + requests: + memory: 256Mi + cpu: 100m + ephemeral-storage: 256Mi + limits: + memory: 1Gi + cpu: 500m + ephemeral-storage: 1Gi + livenessProbe: + tcpSocket: + port: mcp + initialDelaySeconds: 15 + periodSeconds: 30 + readinessProbe: + tcpSocket: + port: mcp + initialDelaySeconds: 10 + periodSeconds: 10 + volumes: + - name: data + persistentVolumeClaim: + claimName: neuron-alpha-data + - name: app-config + configMap: + name: neuron-config + items: + - key: default.yaml + path: default.yaml +--- +apiVersion: v1 +kind: Service +metadata: + name: neuron-alpha + namespace: neuron +spec: + selector: + app: neuron-alpha + ports: + - name: mcp + port: 8001 + targetPort: 8001 + - name: webhook + port: 3847 + targetPort: 3847 + type: ClusterIP diff --git a/servers/legion/apps/neuron-beta.yaml b/servers/legion/apps/neuron-beta.yaml index 8120a75..61709f8 100644 --- a/servers/legion/apps/neuron-beta.yaml +++ b/servers/legion/apps/neuron-beta.yaml @@ -24,12 +24,12 @@ spec: command: - bash - -c - - mkdir -p /root/.neuron && ln -sf /data/neuron.db /root/.neuron/neuron.db && python -m synapse platform serve --mcp-host 0.0.0.0 --mcp-port 8002 --webhook-port 3848 + - mkdir -p /root/.neuron && ln -sf /data/neuron.db /root/.neuron/neuron.db && python -m synapse platform serve --mcp-host 0.0.0.0 --mcp-port 8001 --webhook-port 3847 ports: - name: mcp - containerPort: 8002 + containerPort: 8001 - name: webhook - containerPort: 3848 + containerPort: 3847 envFrom: - configMapRef: name: neuron-config @@ -81,9 +81,9 @@ spec: app: neuron-beta ports: - name: mcp - port: 8002 - targetPort: 8002 + port: 8001 + targetPort: 8001 - name: webhook - port: 3848 - targetPort: 3848 + port: 3847 + targetPort: 3847 type: ClusterIP diff --git a/servers/legion/k8s/neuron/lb.yaml b/servers/legion/k8s/neuron/lb.yaml new file mode 100644 index 0000000..263f4b0 --- /dev/null +++ b/servers/legion/k8s/neuron/lb.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: neuron-lb + namespace: neuron + annotations: + # Switch active slot by changing the selector value below, then git push. + # Argo CD syncs in ~30s, k8s updates endpoints instantly — zero downtime. + # Valid values: neuron | neuron-beta | neuron-alpha +spec: + selector: + app: neuron + ports: + - name: mcp + port: 8001 + targetPort: 8001 + - name: webhook + port: 3847 + targetPort: 3847 + type: ClusterIP diff --git a/servers/legion/k8s/neuron/pvc-alpha.yaml b/servers/legion/k8s/neuron/pvc-alpha.yaml new file mode 100644 index 0000000..bea3d65 --- /dev/null +++ b/servers/legion/k8s/neuron/pvc-alpha.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: neuron-alpha-data + namespace: neuron +spec: + storageClassName: local-path + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi