Merge pull request #127 from sirius0xdev/feat/add-trading-dashboard-db-to-siriusdevops-pgdb

Feat/add trading dashboard db to siriusdevops pgdb
This commit is contained in:
sirius0xdev 2026-05-24 16:56:27 -04:00 • committed by GitHub
commit 8bc3738a3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 975 additions and 8 deletions

View file

@ -6,3 +6,6 @@ resources:
- waitlist-db-credentials.yaml
- waitlist-db.yaml
- siriusdevops-scheduled-backup.yaml
# New trading dashboard DB
- trading-dashboard-db-credentials.yaml
- trading-dashboard-db.yaml

View file

@ -17,6 +17,12 @@ spec:
login: true
passwordSecret:
name: waitlist-db-credentials
# NEW - Trading Dashboard role
- name: trading_dashboard
ensure: present
login: true
passwordSecret:
name: trading-dashboard-db-credentials
bootstrap:
initdb:

View file

@ -0,0 +1,19 @@
apiVersion: v1
kind: Secret
metadata:
name: trading-dashboard-db-credentials
namespace: customer1
type: Opaque
stringData:
username: trading_dashboard
password: CHANGE_ME_TO_STRONG_PASSWORD
sops:
# Run `sops -e -i trading-dashboard-db-credentials.yaml` after filling in the password
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age: []
lastmodified: ""
mac: ""
encrypted_regex: ^(data|stringData)$

View file

@ -0,0 +1,10 @@
apiVersion: postgresql.cnpg.io/v1
kind: Database
metadata:
name: trading-dashboard-db
namespace: customer1
spec:
cluster:
name: siriusdevops-pgdb
name: trading_dashboard
owner: trading_dashboard

View file

@ -4,7 +4,6 @@ metadata:
name: trade-dashboard-config
namespace: customer1
data:
DB_USER: "trading"
DB_HOST: "hermes-pgdb-rw.customer1.svc.cluster.local"
DB_HOST: "siriusdevops-pgdb-rw.customer1.svc.cluster.local"
DB_PORT: "5432"
DB_NAME: "trading_data"
DB_NAME: "trading_dashboard"

View file

@ -41,12 +41,12 @@ spec:
- name: DB_USER
valueFrom:
secretKeyRef:
name: trading-db-credentials
name: trading-dashboard-db-credentials
key: username
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: trading-db-credentials
name: trading-dashboard-db-credentials
key: password
startupProbe:
httpGet:
@ -61,3 +61,9 @@ spec:
port: 8000
initialDelaySeconds: 30
periodSeconds: 30
readinessProbe:
httpGet:
path: /api/health
port: 8000
initialDelaySeconds: 5
periodSeconds: 10