Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
helm: gate uploads PVC behind backend.uploads.persistence.enabled (#3655)
LinYushena6247ad714ac
diff --git a/SELF_HOSTING.md b/SELF_HOSTING.mdindex 4c7dfc31f2..8aa2826b88 100644--- a/SELF_HOSTING.md+++ b/SELF_HOSTING.md@@ -144,7 +144,7 @@ If you already run a Kubernetes cluster, you can deploy Multica there instead ofThe chart creates the following resources in the target namespace:- `multica-postgres` — `pgvector/pgvector:pg17` backed by a 10Gi PVC-- `multica-backend` — Go API/WS server backed by a 5Gi uploads PVC+- `multica-backend` — Go API/WS server. Backed by a 5Gi `ReadWriteOnce` uploads PVC by default; set `backend.uploads.persistence.enabled=false` when you have configured S3 (`backend.config.s3Bucket`) and don't want the chart to declare the PVC at all.- `multica-frontend` — Next.js standalone server- Two `Ingress` resources: one for the web host, one for the backend host- `multica-config` ConfigMap (rendered from `values.yaml`)diff --git a/deploy/helm/multica/templates/backend.yaml b/deploy/helm/multica/templates/backend.yamlindex 9d805c6ff0..d3e2566785 100644--- a/deploy/helm/multica/templates/backend.yaml+++ b/deploy/helm/multica/templates/backend.yaml@@ -1,4 +1,5 @@{{- $backendImageTag := default .Chart.AppVersion .Values.images.backend.tag -}}+{{- if .Values.backend.uploads.persistence.enabled -}}apiVersion: v1kind: PersistentVolumeClaimmetadata:@@ -7,7 +8,8 @@ metadata:{{- include "multica.labels" . | nindent 4 }}app.kubernetes.io/component: backendspec:- accessModes: [ReadWriteOnce]+ accessModes:+ {{- toYaml .Values.backend.uploads.persistence.accessModes | nindent 4 }}resources:requests:storage: {{ .Values.backend.uploads.persistence.size | quote }}@@ -15,6 +17,7 @@ spec:storageClassName: {{ . | quote }}{{- end }}---+{{- end }}apiVersion: apps/v1kind: Deploymentmetadata:@@ -66,9 +69,11 @@ spec:env:- name: DATABASE_URLvalue: {{ include "multica.databaseUrl" . | quote }}+ {{- if .Values.backend.uploads.persistence.enabled }}volumeMounts:- name: uploadsmountPath: /app/data/uploads+ {{- end }}# The entrypoint runs `./migrate up` before serving traffic. On a# cold cluster (Postgres still coming up) this can take minutes. The# startupProbe holds off liveness/readiness until /healthz is OK,@@ -95,10 +100,12 @@ spec:periodSeconds: 30resources:{{- toYaml .Values.backend.resources | nindent 12 }}+ {{- if .Values.backend.uploads.persistence.enabled }}volumes:- name: uploadspersistentVolumeClaim:claimName: {{ include "multica.backend.fullname" . }}-uploads+ {{- end }}---apiVersion: v1kind: Servicediff --git a/deploy/helm/multica/values.yaml b/deploy/helm/multica/values.yamlindex cca884b3a2..409d509136 100644--- a/deploy/helm/multica/values.yaml+++ b/deploy/helm/multica/values.yaml@@ -59,8 +59,29 @@ backend:replicas: 1uploads:persistence:+ # When true (default) the chart provisions a PersistentVolumeClaim for+ # /app/data/uploads and mounts it into the backend pod. The backend only+ # uses this directory when S3 is NOT configured (`backend.config.s3Bucket`+ # empty) — see server/cmd/server/router.go for the storage selection.+ #+ # Set to false when you have configured S3/CloudFront and don't want the+ # chart to declare the uploads PVC at all. The default access mode is+ # ReadWriteOnce, which prevents `backend.replicas > 1` from scheduling a+ # second pod (Multi-Attach error); disabling persistence — or switching+ # accessModes to a ReadWriteMany class — removes that constraint on the+ # storage side. Note: backend startup migrations are not yet serialized+ # across pods, so multi-replica still requires care beyond the chart.+ enabled: truesize: 5Gi+ # Leave empty to use the cluster's default StorageClass.storageClass: ""+ # PVC accessModes. Defaults to [ReadWriteOnce] to match the typical+ # local-path / hostPath / EBS StorageClass on a single-node setup. Switch+ # to [ReadWriteMany] (with a compatible StorageClass such as NFS, EFS,+ # CephFS) if you intend to share the uploads volume across multiple+ # backend replicas without S3.+ accessModes:+ - ReadWriteOnce# All non-secret backend env. Secret values come from `existingSecret`.config:appEnv: production