chore(neuron): retire Python backend — keep cloudflared only

Remove neuron/neuron-alpha/neuron-beta/neuron-gamma Deployments and
Services, the slot LB service, Python ingress, slot PVCs, snapshot job,
neuron-config ConfigMap, and neuron-secrets ExternalSecret. The Python
MCP backend has been superseded by the Spring Boot backend in neuron-prod.

Cloudflared Deployment and cloudflared-secret ExternalSecret are
retained in the neuron namespace. The neuron-data PVC is preserved
for data safety.
This commit is contained in:
Will Anderson
2026-04-24 20:39:10 -05:00
parent b411f2a7b0
commit 5d4cc17829
12 changed files with 1 additions and 624 deletions
-92
View File
@@ -1,92 +0,0 @@
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:617dcd1d5c1d148838b8e73df1bba8296257c0b6
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
env:
- name: NEURON_SERVER_NAME
value: "neuron-alpha"
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
-92
View File
@@ -1,92 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: neuron-beta
namespace: neuron
labels:
app: neuron-beta
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: neuron-beta
template:
metadata:
labels:
app: neuron-beta
spec:
containers:
- name: neuron
image: registry.neuralplatform.ai/neural-platform/neuron:617dcd1d5c1d148838b8e73df1bba8296257c0b6
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
env:
- name: NEURON_SERVER_NAME
value: "neuron-beta"
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-beta-data
- name: app-config
configMap:
name: neuron-config
items:
- key: default.yaml
path: default.yaml
---
apiVersion: v1
kind: Service
metadata:
name: neuron-beta
namespace: neuron
spec:
selector:
app: neuron-beta
ports:
- name: mcp
port: 8001
targetPort: 8001
- name: webhook
port: 3847
targetPort: 3847
type: ClusterIP
-92
View File
@@ -1,92 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: neuron-gamma
namespace: neuron
labels:
app: neuron-gamma
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: neuron-gamma
template:
metadata:
labels:
app: neuron-gamma
spec:
containers:
- name: neuron
image: registry.neuralplatform.ai/neural-platform/neuron:617dcd1d5c1d148838b8e73df1bba8296257c0b6
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
env:
- name: NEURON_SERVER_NAME
value: "neuron-gamma"
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-gamma-data
- name: app-config
configMap:
name: neuron-config
items:
- key: default.yaml
path: default.yaml
---
apiVersion: v1
kind: Service
metadata:
name: neuron-gamma
namespace: neuron
spec:
selector:
app: neuron-gamma
ports:
- name: mcp
port: 8001
targetPort: 8001
- name: webhook
port: 3847
targetPort: 3847
type: ClusterIP
+1 -91
View File
@@ -1,95 +1,5 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: neuron
namespace: neuron
labels:
app: neuron
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: neuron
template:
metadata:
labels:
app: neuron
spec:
containers:
- name: neuron
image: registry.neuralplatform.ai/neural-platform/neuron:617dcd1d5c1d148838b8e73df1bba8296257c0b6
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-data
- name: app-config
configMap:
name: neuron-config
items:
- key: default.yaml
path: default.yaml
---
apiVersion: v1
kind: Service
metadata:
name: neuron
namespace: neuron
spec:
selector:
app: neuron
ports:
- name: mcp
port: 8001
targetPort: 8001
- name: webhook
port: 3847
targetPort: 3847
type: ClusterIP
---
# cloudflared — Cloudflare tunnel for external Axon webhook access
# Routes: axon.neuralplatform.ai → neuron:3847
# Routes: axon.neuralplatform.ai → neuron-prod namespace via cloudflared tunnel
apiVersion: apps/v1
kind: Deployment
metadata:
-27
View File
@@ -1,27 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: neuron-config
namespace: neuron
data:
MCP_PORT: "8001"
MCP_HOST: "0.0.0.0"
WEBHOOK_PORT: "3847"
NEURON_DB_PATH: "/data/neuron.db"
AXON_DB_PATH: "/data/axon.db"
TUNNEL_NAME: "neural-platform"
default.yaml: |
runtime:
name: neuron
version: 0.1.0
storage:
db_path: /data/neuron.db
cache:
max_l1_size: 1000
gc:
gen0_threshold: 3
gen1_threshold: 5
knowledge:
base_path: /data/knowledge
synapse:
path: /data/synapse
@@ -1,36 +1,3 @@
---
# neuron-secrets — GITHUB_WEBHOOK_SECRET, GITEA_WEBHOOK_SECRET, SLACK_BOT_TOKEN, SLACK_SIGNING_SECRET
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: neuron-secrets
namespace: neuron
spec:
refreshInterval: 1h
secretStoreRef:
name: vault
kind: ClusterSecretStore
target:
name: neuron-secrets
creationPolicy: Owner
data:
- secretKey: GITHUB_WEBHOOK_SECRET
remoteRef:
key: secret/data/github
property: webhook_secret
- secretKey: GITEA_WEBHOOK_SECRET
remoteRef:
key: secret/data/gitea
property: api_token
- secretKey: SLACK_BOT_TOKEN
remoteRef:
key: secret/data/slack
property: bot_token
- secretKey: SLACK_SIGNING_SECRET
remoteRef:
key: secret/data/slack
property: signing_secret
---
# cloudflared-secret — TUNNEL_TOKEN for the Cloudflare tunnel
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
-97
View File
@@ -1,97 +0,0 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: neuron
namespace: neuron
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
ingressClassName: traefik
tls:
- secretName: neuron-tls
hosts:
- neuron.neuralplatform.ai
- secretName: neuron-alpha-tls
hosts:
- neuron-alpha.neuralplatform.ai
- alpha.neurontechnologies.ai
- secretName: neuron-beta-tls
hosts:
- neuron-beta.neuralplatform.ai
- beta.neurontechnologies.ai
- secretName: neuron-gamma-tls
hosts:
- neuron-gamma.neuralplatform.ai
- gamma.neurontechnologies.ai
rules:
- host: neuron.neuralplatform.ai
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: neuron
port:
number: 8001
- host: neuron-alpha.neuralplatform.ai
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: neuron-alpha
port:
number: 8001
- host: alpha.neurontechnologies.ai
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: neuron-alpha
port:
number: 8001
- host: neuron-beta.neuralplatform.ai
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: neuron-beta
port:
number: 8001
- host: beta.neurontechnologies.ai
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: neuron-beta
port:
number: 8001
- host: neuron-gamma.neuralplatform.ai
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: neuron-gamma
port:
number: 8001
- host: gamma.neurontechnologies.ai
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: neuron-gamma
port:
number: 8001
-20
View File
@@ -1,20 +0,0 @@
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
-12
View File
@@ -1,12 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: neuron-alpha-data
namespace: neuron
spec:
storageClassName: local-path
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
-12
View File
@@ -1,12 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: neuron-beta-data
namespace: neuron
spec:
storageClassName: local-path
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
-12
View File
@@ -1,12 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: neuron-gamma-data
namespace: neuron
spec:
storageClassName: local-path
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
@@ -1,44 +0,0 @@
# Snapshot Job — copies prod DB into an experiment slot via sqlite3 .backup
# Usage: set SLOT to alpha, beta, or gamma before applying
#
# SLOT=alpha && sed "s/SLOT/${SLOT}/g" snapshot-job.yaml | kubectl apply -f -
#
# The job completes and self-deletes after 5 minutes.
# Always snapshot before deploying a new experiment to a slot.
apiVersion: batch/v1
kind: Job
metadata:
name: snapshot-prod-to-SLOT
namespace: neuron
spec:
ttlSecondsAfterFinished: 300
template:
spec:
restartPolicy: Never
initContainers:
- name: stop-check
image: registry.neuralplatform.ai/neural-platform/neuron:latest
command: ["/bin/sh", "-c", "echo 'Snapshotting prod DB to SLOT — ensure neuron-SLOT pod is stopped first'"]
containers:
- name: snapshot
image: keinos/sqlite3:latest
command: ["/bin/sh", "-c"]
args:
- |
echo "Starting backup from prod to SLOT..."
sqlite3 /src/neuron.db ".backup /dst/neuron.db"
echo "Done. Prod DB snapshotted to SLOT."
ls -lh /dst/neuron.db
volumeMounts:
- name: src
mountPath: /src
readOnly: true
- name: dst
mountPath: /dst
volumes:
- name: src
persistentVolumeClaim:
claimName: neuron-data
- name: dst
persistentVolumeClaim:
claimName: neuron-SLOT-data