From 9a8b59125782c0a9be9c8d4f0bdeb72712bae176 Mon Sep 17 00:00:00 2001 From: Waleed Date: Thu, 22 Jan 2026 11:35:23 -0800 Subject: [PATCH] improvement(helm): add per-deployment extraVolumes support (#2942) --- helm/sim/templates/deployment-app.yaml | 14 ++++++++++++-- helm/sim/templates/deployment-ollama.yaml | 12 +++++++++++- helm/sim/templates/deployment-realtime.yaml | 14 ++++++++++++-- helm/sim/values.yaml | 12 ++++++++++++ 4 files changed, 47 insertions(+), 5 deletions(-) diff --git a/helm/sim/templates/deployment-app.yaml b/helm/sim/templates/deployment-app.yaml index 04eedd755..6b1d63289 100644 --- a/helm/sim/templates/deployment-app.yaml +++ b/helm/sim/templates/deployment-app.yaml @@ -110,12 +110,22 @@ spec: {{- end }} {{- include "sim.resources" .Values.app | nindent 10 }} {{- include "sim.securityContext" .Values.app | nindent 10 }} - {{- with .Values.extraVolumeMounts }} + {{- if or .Values.extraVolumeMounts .Values.app.extraVolumeMounts }} volumeMounts: + {{- with .Values.extraVolumeMounts }} {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.app.extraVolumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} {{- end }} - {{- with .Values.extraVolumes }} + {{- if or .Values.extraVolumes .Values.app.extraVolumes }} volumes: + {{- with .Values.extraVolumes }} {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.app.extraVolumes }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} {{- end }} \ No newline at end of file diff --git a/helm/sim/templates/deployment-ollama.yaml b/helm/sim/templates/deployment-ollama.yaml index a46f2b661..620b84f48 100644 --- a/helm/sim/templates/deployment-ollama.yaml +++ b/helm/sim/templates/deployment-ollama.yaml @@ -92,6 +92,7 @@ spec: {{- toYaml .Values.ollama.readinessProbe | nindent 12 }} {{- end }} {{- include "sim.resources" .Values.ollama | nindent 10 }} + {{- if or .Values.ollama.persistence.enabled .Values.extraVolumeMounts .Values.ollama.extraVolumeMounts }} volumeMounts: {{- if .Values.ollama.persistence.enabled }} - name: ollama-data @@ -100,13 +101,22 @@ spec: {{- with .Values.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} - {{- if .Values.ollama.persistence.enabled }} + {{- with .Values.ollama.extraVolumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- end }} + {{- if or .Values.ollama.persistence.enabled .Values.extraVolumes .Values.ollama.extraVolumes }} volumes: + {{- if .Values.ollama.persistence.enabled }} - name: ollama-data persistentVolumeClaim: claimName: {{ include "sim.fullname" . }}-ollama-data + {{- end }} {{- with .Values.extraVolumes }} {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.ollama.extraVolumes }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} {{- end }} \ No newline at end of file diff --git a/helm/sim/templates/deployment-realtime.yaml b/helm/sim/templates/deployment-realtime.yaml index 746516594..00054ecf3 100644 --- a/helm/sim/templates/deployment-realtime.yaml +++ b/helm/sim/templates/deployment-realtime.yaml @@ -84,12 +84,22 @@ spec: {{- end }} {{- include "sim.resources" .Values.realtime | nindent 10 }} {{- include "sim.securityContext" .Values.realtime | nindent 10 }} - {{- with .Values.extraVolumeMounts }} + {{- if or .Values.extraVolumeMounts .Values.realtime.extraVolumeMounts }} volumeMounts: + {{- with .Values.extraVolumeMounts }} {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.realtime.extraVolumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} {{- end }} - {{- with .Values.extraVolumes }} + {{- if or .Values.extraVolumes .Values.realtime.extraVolumes }} volumes: + {{- with .Values.extraVolumes }} {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.realtime.extraVolumes }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} {{- end }} \ No newline at end of file diff --git a/helm/sim/values.yaml b/helm/sim/values.yaml index 2ee7cbfad..92db160df 100644 --- a/helm/sim/values.yaml +++ b/helm/sim/values.yaml @@ -224,6 +224,10 @@ app: timeoutSeconds: 5 failureThreshold: 3 + # Additional volumes for app deployment (e.g., branding assets, custom configs) + extraVolumes: [] + extraVolumeMounts: [] + # Realtime socket server configuration realtime: # Enable/disable the realtime service @@ -301,6 +305,10 @@ realtime: timeoutSeconds: 5 failureThreshold: 3 + # Additional volumes for realtime deployment + extraVolumes: [] + extraVolumeMounts: [] + # Database migrations job configuration migrations: # Enable/disable migrations job @@ -539,6 +547,10 @@ ollama: timeoutSeconds: 5 failureThreshold: 3 + # Additional volumes for ollama deployment + extraVolumes: [] + extraVolumeMounts: [] + # Ingress configuration ingress: # Enable/disable ingress