Files
mas/deploy/k8s/base/deployment.yaml
Mayne0213 6cee617072 FIX(db): use existing user and database
- Created mas database in PostgreSQL
- Changed from mas_user to bluemayne (existing user)
- Use postgresql-password secret (root password)
- Add CHAINLIT_DATABASE_URL for Chainlit compatibility
- Improved error handling in chainlit_app.py
2025-12-24 00:02:03 +09:00

59 lines
1.6 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: mas
namespace: mas
labels:
app: mas
spec:
replicas: 1
selector:
matchLabels:
app: mas
template:
metadata:
labels:
app: mas
spec:
containers:
- name: mas
image: gitea0213.kro.kr/bluemayne/mas:latest
imagePullPolicy: Always
ports:
- containerPort: 8000
name: http
env:
- name: ANTHROPIC_API_KEY
valueFrom:
secretKeyRef:
name: mas-api-keys
key: anthropic-api-key
- name: GROQ_API_KEY
valueFrom:
secretKeyRef:
name: mas-api-keys
key: groq-api-key
- name: GROQ_API_BASE
value: "https://api.groq.com/openai/v1"
# Chainlit uses asyncpg directly (not SQLAlchemy)
- name: CHAINLIT_DATABASE_URL
value: "postgresql://bluemayne:$(POSTGRES_PASSWORD)@postgresql-primary.postgresql.svc.cluster.local:5432/mas"
# SQLAlchemy format (if needed)
- name: DATABASE_URL
value: "postgresql+asyncpg://bluemayne:$(POSTGRES_PASSWORD)@postgresql-primary.postgresql.svc.cluster.local:5432/mas"
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgresql-password
key: postgres-password
- name: REDIS_URL
value: "redis://redis:6379/0"
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1000m"