Skip to content

Commit

Permalink
[Feat] Added initContainer to modelSpec (#221)
Browse files Browse the repository at this point in the history
* [Feat] Added initContainers to modelSpec

Signed-off-by: AbelHristodor <[email protected]>

* fix indent

Signed-off-by: AbelHristodor <[email protected]>

* Added auto-mount of pvcStorage, one initcontainer only

Signed-off-by: AbelHristodor <[email protected]>

---------

Signed-off-by: AbelHristodor <[email protected]>
  • Loading branch information
AbelHristodor authored Mar 4, 2025
1 parent c564acc commit 2d0617a
Show file tree
Hide file tree
Showing 3 changed files with 299 additions and 65 deletions.
25 changes: 25 additions & 0 deletions helm/templates/deployment-vllm-multi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,31 @@ spec:
labels:
{{- include "chart.engineLabels" . | nindent 8 }}
spec:
{{- if hasKey $modelSpec "initContainer" }}
{{- $container := $modelSpec.initContainer }}
initContainers:
- name: {{ $container.name }}
image: {{ $container.image }}
{{- if $container.command }}
command: {{ toYaml $container.command | nindent 12 }}
{{- end }}
{{- if $container.args }}
args: {{ toYaml $container.args | nindent 12 }}
{{- end }}
{{- if $container.env }}
env: {{ toYaml $container.env | nindent 12 }}
{{- end }}
{{- if $container.resources }}
resources: {{ toYaml $container.resources | nindent 12 }}
{{- end }}
{{- if hasKey $container "mountPvcStorage" }}
volumeMounts:
{{- if and $container.volumeMounts.pvcStorage (hasKey $modelSpec "pvcStorage") }}
- name: {{ .Release.Name }}-storage
mountPath: /data
{{- end }}
{{- end }}
{{- end }}
containers:
- name: "vllm"
image: "{{ required "Required value 'modelSpec.repository' must be defined !" $modelSpec.repository }}:{{ required "Required value 'modelSpec.tag' must be defined !" $modelSpec.tag }}"
Expand Down
Loading

0 comments on commit 2d0617a

Please sign in to comment.