✅ 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>
138 lines
3.4 KiB
YAML
138 lines
3.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: api-gateway
|
|
namespace: foxhunt
|
|
labels:
|
|
app: api-gateway
|
|
component: gateway
|
|
tier: frontend
|
|
version: v1
|
|
spec:
|
|
replicas: 3
|
|
revisionHistoryLimit: 10
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxUnavailable: 1
|
|
maxSurge: 1
|
|
selector:
|
|
matchLabels:
|
|
app: api-gateway
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: api-gateway
|
|
component: gateway
|
|
tier: frontend
|
|
version: v1
|
|
annotations:
|
|
prometheus.io/scrape: "true"
|
|
prometheus.io/port: "9091"
|
|
prometheus.io/path: "/metrics"
|
|
spec:
|
|
serviceAccountName: foxhunt-api-gateway
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
runAsGroup: 1000
|
|
fsGroup: 1000
|
|
containers:
|
|
- name: api-gateway
|
|
image: foxhunt/api-gateway:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- name: grpc
|
|
containerPort: 50051
|
|
protocol: TCP
|
|
- name: metrics
|
|
containerPort: 9091
|
|
protocol: TCP
|
|
- name: health
|
|
containerPort: 8080
|
|
protocol: TCP
|
|
env:
|
|
- name: API_GATEWAY_HOST
|
|
value: "0.0.0.0"
|
|
- name: API_GATEWAY_PORT
|
|
value: "50051"
|
|
- name: METRICS_PORT
|
|
value: "9091"
|
|
- name: JWT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: foxhunt-secrets
|
|
key: jwt-secret
|
|
- name: DATABASE_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: foxhunt-secrets
|
|
key: database-url
|
|
- name: REDIS_URL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: foxhunt-config
|
|
key: redis-url
|
|
- name: RUST_LOG
|
|
value: "info,api_gateway=debug"
|
|
- name: RUST_BACKTRACE
|
|
value: "1"
|
|
resources:
|
|
requests:
|
|
cpu: "1000m"
|
|
memory: "512Mi"
|
|
limits:
|
|
cpu: "2000m"
|
|
memory: "1Gi"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health/liveness
|
|
port: 8080
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health/readiness
|
|
port: 8080
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 5
|
|
timeoutSeconds: 3
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
startupProbe:
|
|
httpGet:
|
|
path: /health/startup
|
|
port: 8080
|
|
initialDelaySeconds: 0
|
|
periodSeconds: 5
|
|
timeoutSeconds: 3
|
|
successThreshold: 1
|
|
failureThreshold: 30
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /app/config
|
|
readOnly: true
|
|
- name: logs
|
|
mountPath: /app/logs
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: api-gateway-config
|
|
- name: logs
|
|
emptyDir: {}
|
|
affinity:
|
|
podAntiAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
podAffinityTerm:
|
|
labelSelector:
|
|
matchExpressions:
|
|
- key: app
|
|
operator: In
|
|
values:
|
|
- api-gateway
|
|
topologyKey: kubernetes.io/hostname
|