- FastAPI app with async SQLAlchemy + Alembic migrations - API: positions CRUD, PnL summary, trade history, webhook endpoint - Dark-themed SPA frontend (vanilla HTML/JS) - K8s: deployment, service, configmap, TsProxy for Tailscale access - Backed by hermes-pgdb / trading_data database - Wired into Flux staging pipeline
58 lines
1.4 KiB
YAML
58 lines
1.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: trade-dashboard
|
|
namespace: customer1
|
|
labels:
|
|
app: trade-dashboard
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: trade-dashboard
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: trade-dashboard
|
|
annotations:
|
|
checksum/config: trade-dashboard-config
|
|
spec:
|
|
terminationGracePeriodSeconds: 30
|
|
containers:
|
|
- name: dashboard
|
|
image: us-central1-docker.pkg.dev/devops-lab-cluster/customer1/trade-dashboard:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 8000
|
|
name: http
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
envFrom:
|
|
- configMapRef:
|
|
name: trade-dashboard-config
|
|
env:
|
|
- name: DB_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: trading-db-credentials
|
|
key: password
|
|
startupProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: 8000
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 5
|
|
failureThreshold: 6
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: 8000
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|