All checks were successful
CD / build (pull_request) Has been skipped
- Dockerfile multi-stage Node 18 (webcomponent) + Python 3.11 - vanna upstream pinned em 365d0617c1a4567ffee1b19b40c27feb4206bfcf - requirements.txt + .env.example + .dockerignore - k8s/: deployment (1 replica, PVC, Recreate), service, ingress (SSE/WS timeouts), PVC 5Gi - .gitea/workflows/cd.yml seguindo template do lab Pendência: criar Secret K8s vanna-clubpetro-secret com OPENAI_API_KEY + CLICKHOUSE_*
66 lines
1.9 KiB
YAML
66 lines
1.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: vanna-clubpetro-deployment
|
|
labels:
|
|
app: vanna-clubpetro
|
|
spec:
|
|
replicas: 1 # ChromaDB SQLite-based — múltiplas réplicas corrompem o vector store
|
|
strategy:
|
|
type: Recreate # com PVC ReadWriteOnce não dá pra ter 2 pods montando ao mesmo tempo
|
|
selector:
|
|
matchLabels:
|
|
app: vanna-clubpetro
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: vanna-clubpetro
|
|
spec:
|
|
containers:
|
|
- name: vanna-clubpetro
|
|
image: us-central1-docker.pkg.dev/corepetro/clubpetro-lab/vanna-clubpetro:lab-latest
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- name: http
|
|
containerPort: 8765
|
|
env:
|
|
- name: VANNA_CORS_ORIGINS
|
|
value: "https://lab.clubpetro.com,https://homologation.clubpetro.com"
|
|
envFrom:
|
|
- secretRef:
|
|
name: vanna-clubpetro-secret
|
|
resources:
|
|
requests:
|
|
cpu: "200m"
|
|
memory: "1Gi"
|
|
limits:
|
|
cpu: "1"
|
|
memory: "2Gi"
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 8765
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: 8765
|
|
initialDelaySeconds: 60
|
|
periodSeconds: 30
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /app/chroma_db
|
|
subPath: chroma_db
|
|
- name: data
|
|
mountPath: /app/data_storage
|
|
subPath: data_storage
|
|
- name: data
|
|
mountPath: /root/.cache/chroma
|
|
subPath: chroma-onnx-cache
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: vanna-clubpetro-data
|