Files
mas/deploy/k8s/base/deployment.yaml
Mayne0213 5a43963971 FEAT(app): mount host Projects directory
- Add hostPath volume mount in deployment
- Enable direct access to Gitea repos
2025-12-24 01:34:08 +09:00

80 lines
2.2 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:
serviceAccountName: mas
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_HOST
value: "postgresql-primary.postgresql.svc.cluster.local"
- name: POSTGRES_PORT
value: "5432"
- name: POSTGRES_USER
value: "bluemayne"
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgresql-root-password
key: password
- name: GITEA_TOKEN
valueFrom:
secretKeyRef:
name: mas-api-keys
key: gitea-token
optional: true
- name: REDIS_URL
value: "redis://redis:6379/0"
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "1Gi"
cpu: "1000m"
volumeMounts:
- name: projects
mountPath: /app/projects
volumes:
- name: projects
hostPath:
path: /home/ubuntu/Projects
type: Directory