Changeset 0.12.0 (#63)
This commit is contained in:
@@ -7,6 +7,24 @@
|
||||
# switchboard-admin - username, password, email (optional)
|
||||
# switchboard-encryption - ENCRYPTION_KEY (required for v0.9.4+)
|
||||
#
|
||||
# PVC:
|
||||
# switchboard-storage - Extraction scratch (always needed)
|
||||
# Requires ReadWriteMany (RWX) — see k8s/storage-pvc.yaml
|
||||
# With S3 backend, PVC is small (extraction status only, not blobs)
|
||||
#
|
||||
# Variables (Gitea CI):
|
||||
# STORAGE_CLASS - StorageClass for PVC (e.g. "cephfs")
|
||||
# STORAGE_SIZE - PVC size (e.g. "10Gi" for PVC, "1Gi" for S3)
|
||||
# STORAGE_BACKEND - "pvc" or "s3" (default: "pvc")
|
||||
# EXTRACTION_CONCURRENCY - Max concurrent extractions (default "3")
|
||||
# EXTRACTOR_IMAGE - Sidecar image (LibreOffice headless)
|
||||
#
|
||||
# S3 secrets (Gitea Secrets — only when STORAGE_BACKEND=s3):
|
||||
# S3_ENDPOINT - e.g. "http://minio:9000" or Ceph RGW URL
|
||||
# S3_BUCKET - bucket name (must exist before deploy)
|
||||
# S3_ACCESS_KEY - S3 access key
|
||||
# S3_SECRET_KEY - S3 secret key
|
||||
#
|
||||
# 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.
|
||||
@@ -96,6 +114,57 @@ spec:
|
||||
name: switchboard-encryption
|
||||
key: ENCRYPTION_KEY
|
||||
optional: true
|
||||
# File storage (v0.12.0+)
|
||||
- name: STORAGE_BACKEND
|
||||
value: "${STORAGE_BACKEND}"
|
||||
- name: STORAGE_PATH
|
||||
value: "/data/storage"
|
||||
- name: EXTRACTION_MODE
|
||||
value: "sidecar"
|
||||
- name: EXTRACTION_CONCURRENCY
|
||||
value: "${EXTRACTION_CONCURRENCY}"
|
||||
# S3 storage (optional — only used when STORAGE_BACKEND=s3)
|
||||
- name: S3_ENDPOINT
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: switchboard-s3
|
||||
key: S3_ENDPOINT
|
||||
optional: true
|
||||
- name: S3_BUCKET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: switchboard-s3
|
||||
key: S3_BUCKET
|
||||
optional: true
|
||||
- name: S3_ACCESS_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: switchboard-s3
|
||||
key: S3_ACCESS_KEY
|
||||
optional: true
|
||||
- name: S3_SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: switchboard-s3
|
||||
key: S3_SECRET_KEY
|
||||
optional: true
|
||||
- name: S3_REGION
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: switchboard-s3
|
||||
key: S3_REGION
|
||||
optional: true
|
||||
- name: S3_PREFIX
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: switchboard-s3
|
||||
key: S3_PREFIX
|
||||
optional: true
|
||||
- name: S3_FORCE_PATH_STYLE
|
||||
value: "true"
|
||||
volumeMounts:
|
||||
- name: storage
|
||||
mountPath: /data/storage
|
||||
resources:
|
||||
requests:
|
||||
memory: "${BE_MEMORY_REQUEST}"
|
||||
@@ -119,6 +188,34 @@ spec:
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
|
||||
# Extractor sidecar (v0.12.0 Phase 2):
|
||||
# Uncomment when switchboard-extractor image is built.
|
||||
# See DESIGN-0.12.0.md — Phase 2: Extraction Pipeline.
|
||||
#
|
||||
# - name: extractor
|
||||
# image: ${EXTRACTOR_IMAGE}:${IMAGE_TAG}
|
||||
# imagePullPolicy: Always
|
||||
# env:
|
||||
# - name: STORAGE_PATH
|
||||
# value: "/data/storage"
|
||||
# - name: EXTRACTION_CONCURRENCY
|
||||
# value: "${EXTRACTION_CONCURRENCY}"
|
||||
# volumeMounts:
|
||||
# - name: storage
|
||||
# mountPath: /data/storage
|
||||
# resources:
|
||||
# requests:
|
||||
# memory: "256Mi"
|
||||
# cpu: "100m"
|
||||
# limits:
|
||||
# memory: "1Gi"
|
||||
# cpu: "1000m"
|
||||
|
||||
volumes:
|
||||
- name: storage
|
||||
persistentVolumeClaim:
|
||||
claimName: switchboard-storage${DEPLOY_SUFFIX}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
||||
32
k8s/storage-pvc.yaml
Normal file
32
k8s/storage-pvc.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
# k8s/storage-pvc.yaml
|
||||
# ============================================
|
||||
# Chat Switchboard - Storage PVC
|
||||
# ============================================
|
||||
# Persistent storage for file attachments, extraction queue,
|
||||
# and future knowledge base / compaction data.
|
||||
#
|
||||
# Requires ReadWriteMany (RWX) for multi-pod backend deployments.
|
||||
# CephFS is recommended; NFS also works.
|
||||
#
|
||||
# Variables:
|
||||
# NAMESPACE - deployment namespace
|
||||
# STORAGE_CLASS - StorageClass name (e.g. "cephfs")
|
||||
# STORAGE_SIZE - PVC size (e.g. "10Gi")
|
||||
# ENVIRONMENT - deployment environment label
|
||||
# ============================================
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: switchboard-storage${DEPLOY_SUFFIX}
|
||||
namespace: ${NAMESPACE}
|
||||
labels:
|
||||
app: switchboard
|
||||
component: storage
|
||||
env: ${ENVIRONMENT}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: "${STORAGE_CLASS}"
|
||||
resources:
|
||||
requests:
|
||||
storage: ${STORAGE_SIZE}
|
||||
Reference in New Issue
Block a user