Skip to content

Commit 0b6a61c

Browse files
Bugfix/507 pp helm chart (#512)
* [Bugfix] Fixed wrong indentation number at ray cluster helm chart. Initial commit. Signed-off-by: ahinsutime <ahinsutime@gmail.com> * [Bugfix] Added a script to test values for helm chart. Fixed additional typo in the helm chart. Signed-off-by: ahinsutime <ahinsutime@gmail.com> --------- Signed-off-by: ahinsutime <ahinsutime@gmail.com> Co-authored-by: Yuhan Liu <32589867+YuhanLiu11@users.noreply.github.com>
1 parent 8025339 commit 0b6a61c

File tree

3 files changed

+38
-10
lines changed

3 files changed

+38
-10
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.1.4
18+
version: 0.1.5
1919

2020
maintainers:
2121
- name: apostac

helm/templates/ray-cluster.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ spec:
9292
{{- end }}
9393
{{- end }}
9494
{{- with $modelSpec.env }}
95-
{{- toYaml . | nindent 10 }}
95+
{{- toYaml . | nindent 14 }}
9696
{{- end }}
9797
{{- if $modelSpec.lmcacheConfig }}
9898
{{- if $modelSpec.lmcacheConfig.enabled }}
@@ -223,7 +223,7 @@ spec:
223223
{{- end }}
224224
{{- end}}
225225
{{- if hasKey $modelSpec "extraVolumes" }}
226-
{{- toYaml $modelSpec.extraVolumes | nindent 8 }}
226+
{{- toYaml $modelSpec.extraVolumes | nindent 10 }}
227227
{{- end}}
228228
{{- end}}
229229
{{- if $modelSpec.imagePullSecret }}
@@ -233,7 +233,7 @@ spec:
233233
{{- if .Values.servingEngineSpec.tolerations }}
234234
{{- with .Values.servingEngineSpec.tolerations }}
235235
tolerations:
236-
{{- toYaml . | nindent 8 }}
236+
{{- toYaml . | nindent 10 }}
237237
{{- end }}
238238
{{- end }}
239239
{{- if .Values.servingEngineSpec.runtimeClassName }}
@@ -250,7 +250,7 @@ spec:
250250
requiredDuringSchedulingIgnoredDuringExecution:
251251
nodeSelectorTerms:
252252
{{- with $modelSpec.nodeSelectorTerms }}
253-
{{- toYaml . | nindent 12 }}
253+
{{- toYaml . | nindent 14 }}
254254
{{- end }}
255255
{{- end }}
256256
workerGroupSpecs:
@@ -264,7 +264,7 @@ spec:
264264
helm-release-name: {{ .Release.Name }}
265265
{{- if .Values.servingEngineSpec.securityContext }}
266266
securityContext:
267-
{{- toYaml .Values.servingEngineSpec.securityContext | nindent 8 }}
267+
{{- toYaml .Values.servingEngineSpec.securityContext | nindent 10 }}
268268
{{- end }}
269269
spec:
270270
containers:
@@ -322,7 +322,7 @@ spec:
322322
{{- end }}
323323
{{- end }}
324324
{{- with $modelSpec.env }}
325-
{{- toYaml . | nindent 10 }}
325+
{{- toYaml . | nindent 16 }}
326326
{{- end }}
327327
{{- if $modelSpec.lmcacheConfig }}
328328
{{- if $modelSpec.lmcacheConfig.enabled }}
@@ -431,7 +431,7 @@ spec:
431431
{{- end }}
432432
{{- end}}
433433
{{- if hasKey $modelSpec "extraVolumes" }}
434-
{{- toYaml $modelSpec.extraVolumes | nindent 8 }}
434+
{{- toYaml $modelSpec.extraVolumes | nindent 12 }}
435435
{{- end}}
436436
{{- end}}
437437
{{- if $modelSpec.imagePullSecret }}
@@ -441,7 +441,7 @@ spec:
441441
{{- if .Values.servingEngineSpec.tolerations }}
442442
{{- with .Values.servingEngineSpec.tolerations }}
443443
tolerations:
444-
{{- toYaml . | nindent 8 }}
444+
{{- toYaml . | nindent 12 }}
445445
{{- end }}
446446
{{- end }}
447447

@@ -459,7 +459,7 @@ spec:
459459
requiredDuringSchedulingIgnoredDuringExecution:
460460
nodeSelectorTerms:
461461
{{- with $modelSpec.nodeSelectorTerms }}
462-
{{- toYaml . | nindent 12 }}
462+
{{- toYaml . | nindent 16 }}
463463
{{- end }}
464464
{{- end }}
465465

utils/helm-chart-test-values.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
CHART_DIR="$1"
6+
VALUES_DIR="$2"
7+
8+
if [[ -z "$CHART_DIR" || -z "$VALUES_DIR" ]]; then
9+
echo "Usage: $0 <helm_chart_dir> <values_dir>"
10+
exit 1
11+
fi
12+
13+
if [[ ! -d "$CHART_DIR" || ! -d "$VALUES_DIR" ]]; then
14+
echo "Error: Both arguments must be directories."
15+
exit 1
16+
fi
17+
18+
for values_file in "$VALUES_DIR"/values*.yaml; do
19+
if [[ -f "$values_file" ]]; then
20+
echo "🔍 Rendering with: $values_file"
21+
22+
if ! helm template my-release "$CHART_DIR" -f "$values_file" > /dev/null; then
23+
echo "❌ Failed to render with $values_file" >&2
24+
else
25+
echo "✅ Success: $values_file"
26+
fi
27+
fi
28+
done

0 commit comments

Comments
 (0)