aee77bbfc0
The NEURON_API_KEY secret was updated in Vault to the real ntn_ key; bumping this annotation triggers a rolling restart so pods pick up the new value.
98 lines
2.8 KiB
YAML
98 lines
2.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: neuron-mcp-blue
|
|
namespace: neuron-prod
|
|
labels:
|
|
app: neuron-mcp
|
|
slot: blue
|
|
env: prod
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: neuron-mcp
|
|
slot: blue
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: neuron-mcp
|
|
slot: blue
|
|
env: prod
|
|
annotations:
|
|
config-hash: "marketplace-postgres-v1"
|
|
secret-hash: "api-key-v2"
|
|
spec:
|
|
terminationGracePeriodSeconds: 30
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: neuron-mcp
|
|
image: registry.neuralplatform.ai/neuron-technologies/neuron-mcp:v0.18.14
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: false # JVM writes temp files; restrict paths via allowedPaths once profiled
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
capabilities:
|
|
drop: ["ALL"]
|
|
env:
|
|
- 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: neuron-prod-config
|
|
- secretRef:
|
|
name: neuron-prod-secrets
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
resources:
|
|
requests:
|
|
cpu: 250m
|
|
memory: 512Mi
|
|
limits:
|
|
cpu: 1500m
|
|
memory: 1536Mi
|
|
lifecycle:
|
|
preStop:
|
|
exec:
|
|
# Give Traefik time to drain in-flight connections before pod terminates
|
|
command: ["sh", "-c", "sleep 8"]
|
|
# startupProbe gives the JVM up to 150s to start before liveness takes over.
|
|
# Prevents false crash loops during slow cold starts.
|
|
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: neuron-prod-data
|