Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions helm/templates/ray-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,15 @@ spec:
- name: {{ include "chart.container-port-name" . }}
containerPort: {{ include "chart.container-port" . }}
readinessProbe:
{{- if $modelSpec.raySpec.headNode.readinessProbe }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To prevent potential template rendering errors (such as nil pointer evaluating interface{}), it is safer to guard the nested field access by checking if headNode is defined before accessing readinessProbe.

              {{- if and $modelSpec.raySpec.headNode $modelSpec.raySpec.headNode.readinessProbe }}

{{- toYaml $modelSpec.raySpec.headNode.readinessProbe | nindent 14 }}
{{- else }}
httpGet:
path: /health
port: {{ include "chart.container-port" . }}
failureThreshold: 1
periodSeconds: 10
{{- end }}
livenessProbe:
exec:
command: ["/bin/bash", "-c", "echo TBD"]
Expand Down
12 changes: 12 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,18 @@ servingEngineSpec:
requestMemory: "1Gi"
# -- GPU request for the head node
requestGPU: 1
# Readiness probe for the Ray head node (raySpec.headNode.readinessProbe).
# If unset, defaults to an httpGet /health probe with failureThreshold 1
# and periodSeconds 10. Override it to relax the probe when the model
# takes a long time to come up on a multi-node setup, otherwise the head
# pod may be marked unready and never receive traffic. Accepts a standard
# Kubernetes probe spec, e.g.:
# readinessProbe:
# httpGet:
# path: /health
# port: 8000
# failureThreshold: 10
# periodSeconds: 30

# -- Container port
containerPort: 8000
Expand Down
Loading