Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Helm] Clean up RayCluster Helm chart ahead of KubeRay 0.4.0 release #751

Merged
Merged
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
31 changes: 18 additions & 13 deletions helm-chart/ray-cluster/templates/raycluster-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ spec:
headGroupSpec:
serviceType: {{ .Values.service.type }}
rayStartParams:
{{- range $key, $val := .Values.head.rayStartParams }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- /*
initArgs is a deprecated alias for rayStartParams.
*/}}
{{- range $key, $val := .Values.head.initArgs }}
{{ $key }}: {{ $val | quote }}
{{- end }}
replicas: {{ .Values.head.replicas }}
template:
spec:
imagePullSecrets: {{- toYaml .Values.imagePullSecrets | nindent 10 }}
Expand All @@ -34,8 +39,6 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources: {{- toYaml .Values.head.resources | nindent 14 }}
env:
- name: TYPE
kevin85421 marked this conversation as resolved.
Show resolved Hide resolved
value: head
{{- toYaml .Values.head.containerEnv | nindent 14}}
{{- with .Values.head.envFrom }}
envFrom: {{- toYaml . | nindent 14}}
Expand All @@ -57,14 +60,18 @@ spec:
metadata:
annotations: {{- toYaml .Values.head.annotations | nindent 10 }}
labels:
groupName: {{ .Values.head.groupName }}
rayCluster: {{ include "ray-cluster.fullname" . }}
{{ include "ray-cluster.labels" . | indent 10 }}

workerGroupSpecs:
{{- range $groupName, $values := .Values.additionalWorkerGroups }}
{{- if ne $values.disabled true }}
- rayStartParams:
{{- range $key, $val := $values.rayStartParams }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- /*
initArgs is a deprecated alias for rayStartParams.
*/}}
{{- range $key, $val := $values.initArgs }}
{{ $key }}: {{ $val | quote }}
{{- end }}
Expand All @@ -86,8 +93,6 @@ spec:
imagePullPolicy: {{ $.Values.image.pullPolicy }}
resources: {{- toYaml $values.resources | nindent 14 }}
env:
- name: TYPE
value: worker
{{- toYaml $values.containerEnv | nindent 14}}
{{- with $values.envFrom }}
envFrom: {{- toYaml $ | nindent 14}}
Expand All @@ -107,13 +112,17 @@ spec:
metadata:
annotations: {{- toYaml $values.annotations | nindent 10 }}
labels:
groupName: {{ $groupName }}
rayCluster: {{ include "ray-cluster.fullname" $ }}
{{ include "ray-cluster.labels" $ | indent 10 }}
{{- end }}
{{- end }}
{{- if ne (.Values.worker.disabled | default false) true }}
- rayStartParams:
{{- range $key, $val := .Values.worker.rayStartParams }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- /*
initArgs is a deprecated alias for rayStartParams.
*/}}
{{- range $key, $val := .Values.worker.initArgs }}
{{ $key }}: {{ $val | quote }}
{{- end }}
Expand All @@ -135,8 +144,6 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources: {{- toYaml .Values.worker.resources | nindent 14 }}
env:
- name: TYPE
value: worker
{{- toYaml .Values.worker.containerEnv | nindent 14}}
{{- with .Values.worker.envFrom }}
envFrom: {{- toYaml . | nindent 14}}
Expand All @@ -156,8 +163,6 @@ spec:
metadata:
annotations: {{- toYaml .Values.worker.annotations | nindent 10 }}
labels:
groupName: {{ .Values.worker.groupName }}
rayCluster: {{ include "ray-cluster.fullname" . }}
{{ include "ray-cluster.labels" . | indent 10 }}
{{- end }}

114 changes: 49 additions & 65 deletions helm-chart/ray-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# The KubeRay community welcomes PRs to expose additional configuration
# in this Helm chart.

image:
repository: rayproject/ray
tag: 2.0.0
Expand Down Expand Up @@ -33,25 +36,25 @@ head:
# requests:
# cpu: "500m"
# memory: "512Mi"
replicas: 1
type: head
labels:
key: value
initArgs:
port: '6379'
redis-password: 'LetMeInRay' # Deprecated since Ray 1.11 due to GCS bootstrapping enabled
# labels:
# key: value
rayStartParams:
dashboard-host: '0.0.0.0'
num-cpus: '1' # can be auto-completed from the limits
node-ip-address: $MY_POD_IP # auto-completed as the head pod IP
block: 'true'
containerEnv:
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
# containerEnv specifies environment variables for the Ray container,
# Follows standard K8s container env schema.
containerEnv: []
# - name: EXAMPLE_ENV
# value: "1"
envFrom: []
# - secretRef:
# name: my-env-secret
# ports optionally allows specifying ports for the Ray container.
# ports: []
# resource requests and limits for the Ray head container.
# Modify as needed for your application.
# Note that the resources in this example are much too small for production.
# Ray pods should be sized to take up entire K8s nodes when possible.
resources:
limits:
cpu: 1
Expand All @@ -67,6 +70,8 @@ head:
volumeMounts:
- mountPath: /tmp/ray
name: log-volume
# sidecarContainers specifies additional containers to attach to the Ray pod.
# Follows standard K8s container spec.
sidecarContainers: []


Expand All @@ -77,35 +82,25 @@ worker:
groupName: workergroup
replicas: 1
type: worker
labels:
key: value
initArgs:
node-ip-address: $MY_POD_IP
redis-password: LetMeInRay
# labels:
# key: value
rayStartParams:
block: 'true'
initContainerImage: 'busybox:1.28' # Enable users to specify the image for init container. Users can pull the busybox image from their private repositories.
containerEnv:
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RAY_DISABLE_DOCKER_CPU_WARNING
value: "1"
- name: CPU_REQUEST
valueFrom:
resourceFieldRef:
containerName: ray-worker
resource: requests.cpu
- name: MY_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
# containerEnv specifies environment variables for the Ray container,
# Follows standard K8s container env schema.
containerEnv: []
# - name: EXAMPLE_ENV
# value: "1"
envFrom: []
# - secretRef:
# name: my-env-secret
ports:
- containerPort: 80
protocol: TCP
# ports optionally allows specifying ports for the Ray container.
# ports: []
# resource requests and limits for the Ray head container.
# Modify as needed for your application.
# Note that the resources in this example are much too small for production.
# Ray pods should be sized to take up entire K8s nodes when possible.
resources:
limits:
cpu: 1
Expand All @@ -122,6 +117,8 @@ worker:
volumeMounts:
- mountPath: /tmp/ray
name: log-volume
# sidecarContainers specifies additional containers to attach to the Ray pod.
# Follows standard K8s container spec.
sidecarContainers: []

# The map's key is used as the groupName.
Expand All @@ -136,33 +133,23 @@ additionalWorkerGroups:
maxReplicas: 3
type: worker
labels: {}
initArgs:
node-ip-address: $MY_POD_IP
redis-password: LetMeInRay
rayStartParams:
block: 'true'
initContainerImage: 'busybox:1.28' # Enable users to specify the image for init container. Users can pull the busybox image from their private repositories.
containerEnv:
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RAY_DISABLE_DOCKER_CPU_WARNING
value: "1"
- name: CPU_REQUEST
valueFrom:
resourceFieldRef:
containerName: ray-worker
resource: requests.cpu
- name: MY_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
# containerEnv specifies environment variables for the Ray container,
# Follows standard K8s container env schema.
containerEnv: []
# - name: EXAMPLE_ENV
# value: "1"
envFrom: []
# - secretRef:
# name: my-env-secret
ports:
- containerPort: 80
protocol: TCP
# - secretRef:
# name: my-env-secret
# ports optionally allows specifying ports for the Ray container.
# ports: []
# resource requests and limits for the Ray head container.
# Modify as needed for your application.
# Note that the resources in this example are much too small for production.
# Ray pods should be sized to take up entire K8s nodes when possible.
resources:
limits:
cpu: 1
Expand All @@ -181,8 +168,5 @@ additionalWorkerGroups:
name: log-volume
sidecarContainers: []

headServiceSuffix: "ray-operator.svc"

service:
type: ClusterIP
port: 8080