Files
foxhunt/k8s/deployments/backtesting-service-deployment.yaml
jgrusewski 7458f1be01 feat(wave12): E2E validation complete - 225-feature pipeline ready
 Validation Results:
- PPO training: 24.2s (1 epoch, 950 samples, dim=225)
- Feature extraction: 105μs/bar (9.5x faster than target)
- Model checkpoint: 293KB (147KB actor + 146KB critic)
- GPU memory: 145MB used (96.4% headroom)
- Zero dimension mismatches

📊 Success Criteria (5/5):
 Feature dimension = 225 (Wave C 201 + Wave D 24)
 Model state_dim = 225
 Training completed without errors
 Checkpoint saved successfully
 No dimension mismatch errors

📁 Training Data Ready:
- ES.FUT: 2.9MB, 180 days
- NQ.FUT: 4.4MB, 180 days
- 6E.FUT: 2.8MB, 180 days
- ZN.FUT: 65KB, 90 days (clean)

🚀 Next: Full production model retraining (4 models, ~10min GPU time)

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 22:48:04 +02:00

144 lines
3.7 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: backtesting-service
namespace: foxhunt
labels:
app: backtesting-service
component: backtesting
tier: backend
version: v1
spec:
replicas: 2
revisionHistoryLimit: 10
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
selector:
matchLabels:
app: backtesting-service
template:
metadata:
labels:
app: backtesting-service
component: backtesting
tier: backend
version: v1
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9093"
prometheus.io/path: "/metrics"
spec:
serviceAccountName: foxhunt-backtesting-service
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
containers:
- name: backtesting-service
image: foxhunt/backtesting-service:latest
imagePullPolicy: Always
ports:
- name: grpc
containerPort: 50053
protocol: TCP
- name: metrics
containerPort: 9093
protocol: TCP
- name: health
containerPort: 8082
protocol: TCP
env:
- name: BACKTESTING_SERVICE_HOST
value: "0.0.0.0"
- name: BACKTESTING_SERVICE_PORT
value: "50053"
- name: METRICS_PORT
value: "9093"
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: foxhunt-secrets
key: database-url
- name: REDIS_URL
valueFrom:
configMapKeyRef:
name: foxhunt-config
key: redis-url
- name: VAULT_ADDR
valueFrom:
configMapKeyRef:
name: foxhunt-config
key: vault-addr
- name: VAULT_TOKEN
valueFrom:
secretKeyRef:
name: foxhunt-secrets
key: vault-token
- name: RUST_LOG
value: "info,backtesting_service=debug"
- name: RUST_BACKTRACE
value: "1"
resources:
requests:
cpu: "1000m"
memory: "1Gi"
limits:
cpu: "2000m"
memory: "2Gi"
livenessProbe:
httpGet:
path: /health
port: 8082
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
readinessProbe:
httpGet:
path: /ready
port: 8082
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
volumeMounts:
- name: config
mountPath: /app/config
readOnly: true
- name: logs
mountPath: /app/logs
- name: data
mountPath: /app/data
- name: results
mountPath: /app/results
volumes:
- name: config
configMap:
name: backtesting-service-config
- name: logs
emptyDir: {}
- name: data
persistentVolumeClaim:
claimName: backtesting-data-pvc
- name: results
persistentVolumeClaim:
claimName: backtesting-results-pvc
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- backtesting-service
topologyKey: kubernetes.io/hostname