Skip to content

Commit

Permalink
Add support for mounting PVCs
Browse files Browse the repository at this point in the history
  • Loading branch information
sandratatarevicova committed Aug 13, 2021
1 parent a2a1c46 commit 120ce73
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/charts/ray/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A Helm chart for deployments of Ray on Kubernetes.
type: application

# Chart version.
version: 0.1.0
version: 0.1.0-1

# Ray version.
appVersion: "latest"
17 changes: 17 additions & 0 deletions deploy/charts/ray/templates/raycluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ spec:
- name: dshm
emptyDir:
medium: Memory
{{- range $volume := .persistentVolumes }}
- name: {{ $volume.claimName }}
persistentVolumeClaim:
claimName: {{ $volume.claimName }}
{{- end }}
containers:
- name: ray-node
imagePullPolicy: Always
Expand All @@ -59,6 +64,18 @@ spec:
volumeMounts:
- mountPath: /dev/shm
name: dshm
{{- range $volume := .persistentVolumes }}
{{- range $mount := $volume.mounts }}
- name: {{ $volume.claimName }}
mountPath: {{ $mount.mountPath }}
{{- if $mount.subPath }}
subPath: {{ $mount.subPath }}
{{- end }}
{{- if $mount.readOnly }}
readOnly: {{ $mount.readOnly }}
{{- end }}
{{- end }}
{{- end }}
resources:
requests:
cpu: {{ .CPU }}
Expand Down
4 changes: 4 additions & 0 deletions deploy/charts/ray/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ podTypes:
rayResources: {}
# Optionally, set a node selector for this podType: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector
nodeSelector: {}
# PersistentVolumeClaim mounts
persistentVolumes: []
# The key for each podType is a user-defined string.
rayWorkerType:
# minWorkers is the minimum number of Ray workers of this pod type to keep running.
Expand All @@ -53,6 +55,8 @@ podTypes:
rayResources: {}
# Optionally, set a node selector for this Pod type. See https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector
nodeSelector: {}
# PersistentVolumeClaim mounts
persistentVolumes: []


# Operator settings:
Expand Down

0 comments on commit 120ce73

Please sign in to comment.