gcloud-lab/apps/base/customer1/trade-dashboard/deployment.yaml
Hermes Agent 57e41178c3 feat(customer1): add trading_dashboard database to siriusdevops-pgdb CNPG cluster
- Add trading_dashboard role + Database CR on siriusdevops-pgdb
- Create SOPS-encrypted credentials secret (template)
- Update trade-dashboard to use the new dedicated DB
  - New host: siriusdevops-pgdb-rw
  - New database: trading_dashboard
  - New credentials secret
2026-05-24 20:02:20 +00:00

69 lines
1.8 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: ghcr.io/sirius0xdev/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_USER
valueFrom:
secretKeyRef:
name: trading-dashboard-db-credentials
key: username
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: trading-dashboard-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
readinessProbe:
httpGet:
path: /api/health
port: 8000
initialDelaySeconds: 5
periodSeconds: 10