Skip to content

Commit 748481e

Browse files
authored
feat: adjustable deployment strategy (#118)
* feat: adjustable deployment strategy * chore: bump up chart version to 0.0.5 Signed-off-by: BrianPark314 <[email protected]>
1 parent 82d2401 commit 748481e

File tree

5 files changed

+34
-5
lines changed

5 files changed

+34
-5
lines changed

helm/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.0.4
18+
version: 0.0.5
1919

2020
maintainers:
2121
- name: apostac

helm/templates/_helpers.tpl

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,36 @@ Define container port name
3131
{{- end }}
3232

3333
{{/*
34-
Define deployment strategy
34+
Define engine deployment strategy.
35+
If .Values.engineStrategy is defined, use it.
36+
Otherwise, fall back to the default rolling update strategy.
3537
*/}}
36-
{{- define "chart.strategy" -}}
38+
{{- define "chart.engineStrategy" -}}
39+
{{- if .Values.servingEngineSpec.strategy }}
40+
{{ toYaml .Values.servingEngineSpec.strategy | nindent 2 }}
41+
{{- else }}
3742
strategy:
3843
rollingUpdate:
3944
maxSurge: 100%
4045
maxUnavailable: 0
4146
{{- end }}
47+
{{- end }}
48+
49+
{{/*
50+
Define router deployment strategy.
51+
If .Values.routerStrategy is defined, use it.
52+
Otherwise, fall back to the default rolling update strategy.
53+
*/}}
54+
{{- define "chart.routerStrategy" -}}
55+
{{- if .Values.routerSpec.strategy }}
56+
{{ toYaml .Values.routerSpec.strategy | nindent 2 }}
57+
{{- else }}
58+
strategy:
59+
rollingUpdate:
60+
maxSurge: 100%
61+
maxUnavailable: 0
62+
{{- end }}
63+
{{- end }}
4264

4365
{{/*
4466
Define additional ports

helm/templates/deployment-router.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ metadata:
77
labels:
88
{{- include "chart.routerLabels" . | nindent 4 }}
99
spec:
10-
replicas: 1
10+
replicas: {{ .Values.routerSpec.replicaCount }}
11+
{{- include "chart.routerStrategy" . | nindent 2 }}
1112
selector:
1213
matchLabels:
1314
{{- include "chart.routerLabels" . | nindent 6 }}

helm/templates/deployment-vllm-multi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
{{- include "chart.engineLabels" . | nindent 4 }}
1010
spec:
1111
replicas: {{ $modelSpec.replicaCount }}
12-
{{- include "chart.strategy" . | nindent 2 }}
12+
{{- include "chart.engineStrategy" . | nindent 2 }}
1313
selector:
1414
matchLabels:
1515
{{- include "chart.engineLabels" . | nindent 6 }}

helm/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ servingEngineSpec:
9292
# -- Set other environment variables from config map
9393
configs: {}
9494

95+
# -- deployment strategy
96+
strategy: {}
97+
9598
# -- Readiness probe configuration
9699
startupProbe:
97100
# -- Number of seconds after the container has started before startup probe is initiated
@@ -171,6 +174,9 @@ routerSpec:
171174
# -- Window size in seconds to calculate the request statistics
172175
requestStatsWindow: 60
173176

177+
# -- deployment strategy
178+
strategy: {}
179+
174180
# -- router resource requests and limits
175181
resources:
176182
requests:

0 commit comments

Comments
 (0)