Skip to content

Commit 9a8b591

Browse files
authored
improvement(helm): add per-deployment extraVolumes support (#2942)
1 parent f3ae3f8 commit 9a8b591

File tree

4 files changed

+47
-5
lines changed

4 files changed

+47
-5
lines changed

helm/sim/templates/deployment-app.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,22 @@ spec:
110110
{{- end }}
111111
{{- include "sim.resources" .Values.app | nindent 10 }}
112112
{{- include "sim.securityContext" .Values.app | nindent 10 }}
113-
{{- with .Values.extraVolumeMounts }}
113+
{{- if or .Values.extraVolumeMounts .Values.app.extraVolumeMounts }}
114114
volumeMounts:
115+
{{- with .Values.extraVolumeMounts }}
115116
{{- toYaml . | nindent 12 }}
117+
{{- end }}
118+
{{- with .Values.app.extraVolumeMounts }}
119+
{{- toYaml . | nindent 12 }}
120+
{{- end }}
116121
{{- end }}
117-
{{- with .Values.extraVolumes }}
122+
{{- if or .Values.extraVolumes .Values.app.extraVolumes }}
118123
volumes:
124+
{{- with .Values.extraVolumes }}
119125
{{- toYaml . | nindent 8 }}
126+
{{- end }}
127+
{{- with .Values.app.extraVolumes }}
128+
{{- toYaml . | nindent 8 }}
129+
{{- end }}
120130
{{- end }}
121131
{{- end }}

helm/sim/templates/deployment-ollama.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ spec:
9292
{{- toYaml .Values.ollama.readinessProbe | nindent 12 }}
9393
{{- end }}
9494
{{- include "sim.resources" .Values.ollama | nindent 10 }}
95+
{{- if or .Values.ollama.persistence.enabled .Values.extraVolumeMounts .Values.ollama.extraVolumeMounts }}
9596
volumeMounts:
9697
{{- if .Values.ollama.persistence.enabled }}
9798
- name: ollama-data
@@ -100,13 +101,22 @@ spec:
100101
{{- with .Values.extraVolumeMounts }}
101102
{{- toYaml . | nindent 12 }}
102103
{{- end }}
103-
{{- if .Values.ollama.persistence.enabled }}
104+
{{- with .Values.ollama.extraVolumeMounts }}
105+
{{- toYaml . | nindent 12 }}
106+
{{- end }}
107+
{{- end }}
108+
{{- if or .Values.ollama.persistence.enabled .Values.extraVolumes .Values.ollama.extraVolumes }}
104109
volumes:
110+
{{- if .Values.ollama.persistence.enabled }}
105111
- name: ollama-data
106112
persistentVolumeClaim:
107113
claimName: {{ include "sim.fullname" . }}-ollama-data
114+
{{- end }}
108115
{{- with .Values.extraVolumes }}
109116
{{- toYaml . | nindent 8 }}
110117
{{- end }}
118+
{{- with .Values.ollama.extraVolumes }}
119+
{{- toYaml . | nindent 8 }}
120+
{{- end }}
111121
{{- end }}
112122
{{- end }}

helm/sim/templates/deployment-realtime.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,22 @@ spec:
8484
{{- end }}
8585
{{- include "sim.resources" .Values.realtime | nindent 10 }}
8686
{{- include "sim.securityContext" .Values.realtime | nindent 10 }}
87-
{{- with .Values.extraVolumeMounts }}
87+
{{- if or .Values.extraVolumeMounts .Values.realtime.extraVolumeMounts }}
8888
volumeMounts:
89+
{{- with .Values.extraVolumeMounts }}
8990
{{- toYaml . | nindent 12 }}
91+
{{- end }}
92+
{{- with .Values.realtime.extraVolumeMounts }}
93+
{{- toYaml . | nindent 12 }}
94+
{{- end }}
9095
{{- end }}
91-
{{- with .Values.extraVolumes }}
96+
{{- if or .Values.extraVolumes .Values.realtime.extraVolumes }}
9297
volumes:
98+
{{- with .Values.extraVolumes }}
9399
{{- toYaml . | nindent 8 }}
100+
{{- end }}
101+
{{- with .Values.realtime.extraVolumes }}
102+
{{- toYaml . | nindent 8 }}
103+
{{- end }}
94104
{{- end }}
95105
{{- end }}

helm/sim/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ app:
224224
timeoutSeconds: 5
225225
failureThreshold: 3
226226

227+
# Additional volumes for app deployment (e.g., branding assets, custom configs)
228+
extraVolumes: []
229+
extraVolumeMounts: []
230+
227231
# Realtime socket server configuration
228232
realtime:
229233
# Enable/disable the realtime service
@@ -301,6 +305,10 @@ realtime:
301305
timeoutSeconds: 5
302306
failureThreshold: 3
303307

308+
# Additional volumes for realtime deployment
309+
extraVolumes: []
310+
extraVolumeMounts: []
311+
304312
# Database migrations job configuration
305313
migrations:
306314
# Enable/disable migrations job
@@ -539,6 +547,10 @@ ollama:
539547
timeoutSeconds: 5
540548
failureThreshold: 3
541549

550+
# Additional volumes for ollama deployment
551+
extraVolumes: []
552+
extraVolumeMounts: []
553+
542554
# Ingress configuration
543555
ingress:
544556
# Enable/disable ingress

0 commit comments

Comments
 (0)