Changeset 0.6.0 (#36)

This commit is contained in:
2026-02-20 22:24:47 +00:00
parent 30d0c11219
commit 925b70f98c
34 changed files with 2575 additions and 637 deletions

View File

@@ -2,6 +2,14 @@
# ============================================
# Chat Switchboard - Backend Deployment
# ============================================
# Secrets:
# switchboard-db-credentials - POSTGRES_USER, POSTGRES_PASSWORD
# switchboard-admin - username, password, email (optional)
#
# Admin bootstrap: on every pod start, if SWITCHBOARD_ADMIN_* env vars
# are set, the backend upserts an admin user. Change the secret and
# restart the pod to reset the admin password.
# ============================================
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -37,6 +45,8 @@ spec:
value: "${ENVIRONMENT}"
- name: PORT
value: "8080"
- name: BASE_PATH
value: "${BASE_PATH}"
- name: POSTGRES_HOST
value: "${POSTGRES_HOST}"
- name: POSTGRES_PORT
@@ -55,6 +65,24 @@ spec:
key: POSTGRES_PASSWORD
- name: DATABASE_URL
value: "postgres://$(POSTGRES_USER):$(POSTGRES_PASSWORD)@${POSTGRES_HOST}:${POSTGRES_PORT}/${DB_NAME}?sslmode=disable"
- name: SWITCHBOARD_ADMIN_USERNAME
valueFrom:
secretKeyRef:
name: switchboard-admin
key: username
optional: true
- name: SWITCHBOARD_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: switchboard-admin
key: password
optional: true
- name: SWITCHBOARD_ADMIN_EMAIL
valueFrom:
secretKeyRef:
name: switchboard-admin
key: email
optional: true
resources:
requests:
memory: "${BE_MEMORY_REQUEST}"
@@ -64,7 +92,7 @@ spec:
cpu: "${BE_CPU_LIMIT}"
readinessProbe:
httpGet:
path: /health
path: ${BASE_PATH}/health
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
@@ -72,7 +100,7 @@ spec:
failureThreshold: 3
livenessProbe:
httpGet:
path: /health
path: ${BASE_PATH}/health
port: 8080
initialDelaySeconds: 10
periodSeconds: 30