refactor: reorganize Helm chart structure and update service configurations

This commit is contained in:
hhhhsc
2025-10-23 16:57:12 +08:00
parent c998de2e9d
commit 17e6cea1d9
61 changed files with 3156 additions and 984 deletions

View File

@@ -0,0 +1,5 @@
apiVersion: v1
description: A Helm chart for Kubernetes
name: ray-cluster
version: 1.4.2
icon: https://github.com/ray-project/ray/raw/master/doc/source/images/ray_header_logo.png

View File

@@ -0,0 +1,55 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "ray-cluster.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "ray-cluster.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "ray-cluster.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "ray-cluster.labels" -}}
helm.sh/chart: {{ include "ray-cluster.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "ray-cluster.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "ray-cluster.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,407 @@
apiVersion: ray.io/v1
kind: RayCluster
metadata:
name: {{ include "ray-cluster.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "ray-cluster.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.head.rayVersion }}
rayVersion: {{ . }}
{{- end }}
{{- with .Values.head.enableInTreeAutoscaling }}
enableInTreeAutoscaling: {{ . }}
{{- end }}
{{- with .Values.head.autoscalerOptions }}
autoscalerOptions:
{{- toYaml . | nindent 4 }}
{{- end }}
headGroupSpec:
{{- with .Values.head.headService }}
headService:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.service.type }}
serviceType: {{ . }}
{{- end }}
{{- if or .Values.head.rayStartParams .Values.head.initArgs }}
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 }}
{{- else }}
rayStartParams: {}
{{- end }}
template:
metadata:
labels:
{{- include "ray-cluster.labels" . | nindent 10 }}
{{- with .Values.head.labels }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.head.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec:
{{- with .Values.head.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: ray-head
{{- if .Values.head.image }}
image: {{ .Values.head.image.repository }}:{{ .Values.head.image.tag }}
imagePullPolicy: {{ .Values.head.image.pullPolicy }}
{{- else }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- end }}
{{- with .Values.head.command }}
command:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.head.args }}
args:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with concat .Values.common.containerEnv .Values.head.containerEnv }}
env:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.head.envFrom }}
envFrom:
{{- toYaml . | nindent 10 }}
{{- end }}
{{ with .Values.head.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.head.ports }}
ports:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.head.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.head.lifecycle }}
lifecycle:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.head.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.head.sidecarContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.head.volumes }}
volumes:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.head.dnsConfig }}
dnsConfig:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.head.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.head.affinity }}
affinity:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.head.tolerations }}
tolerations:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.head.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with .Values.head.priority }}
priority: {{ . }}
{{- end }}
{{- with .Values.head.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.head.restartPolicy }}
restartPolicy: {{ . }}
{{- end }}
{{- with .Values.head.serviceAccountName }}
serviceAccountName: {{ . }}
{{- end }}
{{- with .Values.head.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 10 }}
{{- end }}
workerGroupSpecs:
{{- if not .Values.worker.disabled }}
- groupName: {{ .Values.worker.groupName }}
replicas: {{ .Values.worker.replicas }}
minReplicas: {{ .Values.worker.minReplicas | default 0 }}
maxReplicas: {{ .Values.worker.maxReplicas | default 2147483647 }}
numOfHosts: {{ .Values.worker.numOfHosts | default 1 }}
{{- if or .Values.worker.rayStartParams .Values.worker.initArgs }}
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 }}
{{- else }}
rayStartParams: {}
{{- end }}
template:
metadata:
labels:
{{- include "ray-cluster.labels" . | nindent 10 }}
{{- with .Values.worker.labels }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.worker.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec:
{{- with .Values.worker.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: ray-worker
{{- if .Values.worker.image }}
image: {{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag }}
imagePullPolicy: {{ .Values.worker.image.pullPolicy }}
{{- else }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- end }}
{{- with .Values.worker.command }}
command:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.worker.args }}
args:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with concat .Values.common.containerEnv .Values.worker.containerEnv }}
env:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.worker.envFrom }}
envFrom:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.worker.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.worker.ports }}
ports:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.worker.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.worker.lifecycle }}
lifecycle:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.worker.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.worker.sidecarContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.worker.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.worker.dnsConfig }}
dnsConfig:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.worker.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.worker.affinity }}
affinity:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.worker.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.worker.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with .Values.worker.priority }}
priority: {{ . }}
{{- end }}
{{- with .Values.worker.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.worker.restartPolicy }}
restartPolicy: {{ . }}
{{- end }}
{{- with .Values.worker.serviceAccountName }}
serviceAccountName: {{ . }}
{{- end }}
{{- with .Values.worker.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
{{- range $groupName, $values := .Values.additionalWorkerGroups }}
{{- if not $values.disabled }}
- groupName: {{ $groupName }}
replicas: {{ $values.replicas }}
minReplicas: {{ $values.minReplicas | default 0 }}
maxReplicas: {{ $values.maxReplicas | default 2147483647 }}
numOfHosts: {{ $values.numOfHosts | default 1 }}
{{- if or $values.rayStartParams $values.initArgs }}
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 }}
{{- else }}
rayStartParams: {}
{{- end }}
template:
metadata:
labels:
{{- include "ray-cluster.labels" $ | nindent 10 }}
{{- with $values.labels }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with $values.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec:
{{- with $values.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: ray-worker
{{- if $values.image }}
image: {{ $values.image.repository }}:{{ $values.image.tag }}
imagePullPolicy: {{ $values.image.pullPolicy }}
{{- else }}
image: {{ $.Values.image.repository }}:{{ $.Values.image.tag }}
imagePullPolicy: {{ $.Values.image.pullPolicy }}
{{- end }}
{{- with $values.command }}
command:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with $values.args }}
args:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with concat $.Values.common.containerEnv ($values.containerEnv | default list) }}
env:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with $values.envFrom }}
envFrom:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with $values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with $values.ports }}
ports:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with $values.lifecycle }}
lifecycle:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with $values.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with $values.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with $values.sidecarContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $values.dnsConfig }}
dnsConfig:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with $values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with $values.affinity }}
affinity:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with $values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $values.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with $values.priority }}
priority: {{ . }}
{{- end }}
{{- with $values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $values.restartPolicy }}
restartPolicy: {{ . }}
{{- end }}
{{- with $values.serviceAccountName }}
serviceAccountName: {{ . }}
{{- end }}
{{- with $values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: datamate-runtime
labels:
ray.io/node-type: head
spec:
type: ClusterIP
ports:
- port: 8081
targetPort: 8081
protocol: TCP
selector:
ray.io/node-type: head

View File

@@ -0,0 +1,396 @@
# Default values for ray-cluster.
# 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: datamate-runtime
tag: latest
pullPolicy: IfNotPresent
nameOverride: "kuberay"
fullnameOverride: "datamate-raycluster"
imagePullSecrets: []
# - name: an-existing-secret
# common defined values shared between the head and worker
common:
# containerEnv specifies environment variables for the Ray head and worker containers.
# Follows standard K8s container env schema.
containerEnv: []
# - name: BLAH
# value: VAL
head:
# rayVersion determines the autoscaler's image version.
# It should match the Ray version in the image of the containers.
# rayVersion: 2.46.0
# If enableInTreeAutoscaling is true, the autoscaler sidecar will be added to the Ray head pod.
# Ray autoscaler integration is supported only for Ray versions >= 1.11.0
# Ray autoscaler integration is Beta with KubeRay >= 0.3.0 and Ray >= 2.0.0.
# enableInTreeAutoscaling: true
# autoscalerOptions is an OPTIONAL field specifying configuration overrides for the Ray autoscaler.
# The example configuration shown below represents the DEFAULT values.
# autoscalerOptions:
# upscalingMode: Default
# idleTimeoutSeconds is the number of seconds to wait before scaling down a worker pod which is not using Ray resources.
# idleTimeoutSeconds: 60
# imagePullPolicy optionally overrides the autoscaler container's default image pull policy (IfNotPresent).
# imagePullPolicy: IfNotPresent
# Optionally specify the autoscaler container's securityContext.
# securityContext: {}
# env: []
# envFrom: []
# resources specifies optional resource request and limit overrides for the autoscaler container.
# For large Ray clusters, we recommend monitoring container resource usage to determine if overriding the defaults is required.
# resources:
# limits:
# cpu: "500m"
# memory: "512Mi"
# requests:
# cpu: "500m"
# memory: "512Mi"
initContainers: []
labels: {}
# Note: From KubeRay v0.6.0, users need to create the ServiceAccount by themselves if they specify the `serviceAccountName`
# in the headGroupSpec. See https://github.com/ray-project/kuberay/pull/1128 for more details.
serviceAccountName: ""
restartPolicy: ""
rayStartParams:
object-store-memory: '78643200'
# containerEnv specifies environment variables for the Ray container,
# Follows standard K8s container env schema.
containerEnv:
- name: RAY_DEDUP_LOGS
value: "0"
- name: RAY_TQDM_PATCH_PRINT
value: "0"
- name: MYSQL_HOST
value: "datamate-database"
- name: MYSQL_PORT
value: "3306"
- name: MYSQL_USER
value: "root"
- name: MYSQL_PASSWORD
value: "Huawei@123"
- name: MYSQL_DATABASE
value: "datamate"
# - 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;
# we don't recommend allocating less than 8G memory for a Ray pod in production.
# Ray pods should be sized to take up entire K8s nodes when possible.
# Always set CPU and memory limits for Ray pods.
# It is usually best to set requests equal to limits.
# See https://docs.ray.io/en/latest/cluster/kubernetes/user-guides/config.html#resources
# for further guidance.
resources:
limits:
cpu: "2"
# To avoid out-of-memory issues, never allocate less than 2G memory for the Ray head.
memory: "4G"
requests:
cpu: "1"
memory: "2G"
annotations: {}
nodeSelector: {}
tolerations: []
affinity: {}
# Pod security context.
podSecurityContext: {}
# Ray container security context.
securityContext: {}
# Optional: The following volumes/volumeMounts configurations are optional but recommended because
# Ray writes logs to /tmp/ray/session_latests/logs instead of stdout/stderr.
volumes:
- name: log-volume
hostPath:
path: /opt/datamate/data/log
type: DirectoryOrCreate
- name: dataset-volume
hostPath:
path: /opt/datamate/data/dataset
type: DirectoryOrCreate
- name: flow-volume
hostPath:
path: /opt/datamate/data/flow
type: DirectoryOrCreate
volumeMounts:
- mountPath: /tmp/ray
name: log-volume
subPath: ray/head
- mountPath: /dataset
name: dataset-volume
- mountPath: /flow
name: flow-volume
# sidecarContainers specifies additional containers to attach to the Ray pod.
# Follows standard K8s container spec.
sidecarContainers:
- name: runtime
image: datamate-runtime
imagePullPolicy: IfNotPresent
command:
- python
- /opt/runtime/datamate/operator_runtime.py
- --port
- "8081"
env:
- name: MYSQL_HOST
value: "datamate-database"
- name: MYSQL_PORT
value: "3306"
- name: MYSQL_USER
value: "root"
- name: MYSQL_PASSWORD
value: "Huawei@123"
- name: MYSQL_DATABASE
value: "datamate"
ports:
- containerPort: 8081
volumeMounts:
- mountPath: /tmp/ray
name: log-volume
subPath: ray/head
- mountPath: /var/log/datamate
name: log-volume
- mountPath: /dataset
name: dataset-volume
- mountPath: /flow
name: flow-volume
# See docs/guidance/pod-command.md for more details about how to specify
# container command for head Pod.
command: []
args: []
# Optional, for the user to provide any additional fields to the service.
# See https://pkg.go.dev/k8s.io/Kubernetes/pkg/api/v1#Service
headService: {}
# metadata:
# annotations:
# prometheus.io/scrape: "true"
# Custom pod DNS configuration
# See https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config
# dnsConfig:
# nameservers:
# - 8.8.8.8
# searches:
# - example.local
# options:
# - name: ndots
# value: "2"
# - name: edns0
topologySpreadConstraints: []
worker:
# If you want to disable the default workergroup
# uncomment the line below
# disabled: true
groupName: workergroup
replicas: 1
minReplicas: 1
maxReplicas: 3
labels: {}
serviceAccountName: ""
restartPolicy: ""
rayStartParams: {}
initContainers: []
# containerEnv specifies environment variables for the Ray container,
# Follows standard K8s container env schema.
containerEnv:
- name: RAY_DEDUP_LOGS
value: "0"
- name: RAY_TQDM_PATCH_PRINT
value: "0"
- name: MYSQL_HOST
value: "datamate-database"
- name: MYSQL_PORT
value: "3306"
- name: MYSQL_USER
value: "root"
- name: MYSQL_PASSWORD
value: "Huawei@123"
- name: MYSQL_DATABASE
value: "datamate"
# - 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;
# we don't recommend allocating less than 8G memory for a Ray pod in production.
# Ray pods should be sized to take up entire K8s nodes when possible.
# Always set CPU and memory limits for Ray pods.
# It is usually best to set requests equal to limits.
# See https://docs.ray.io/en/latest/cluster/kubernetes/user-guides/config.html#resources
# for further guidance.
resources:
limits:
cpu: "4"
memory: "8G"
requests:
cpu: "1"
memory: "1G"
annotations: {}
nodeSelector: {}
tolerations: []
affinity: {}
# Pod security context.
podSecurityContext: {}
# Ray container security context.
securityContext: {}
# Optional: The following volumes/volumeMounts configurations are optional but recommended because
# Ray writes logs to /tmp/ray/session_latests/logs instead of stdout/stderr.
volumes:
- name: log-volume
hostPath:
path: /opt/datamate/data/log
type: DirectoryOrCreate
- name: dataset-volume
hostPath:
path: /opt/datamate/data/dataset
type: DirectoryOrCreate
- name: flow-volume
hostPath:
path: /opt/datamate/data/flow
type: DirectoryOrCreate
volumeMounts:
- mountPath: /tmp/ray
name: log-volume
subPath: ray/worker
- mountPath: /dataset
name: dataset-volume
- mountPath: /flow
name: flow-volume
# sidecarContainers specifies additional containers to attach to the Ray pod.
# Follows standard K8s container spec.
sidecarContainers: []
# See docs/guidance/pod-command.md for more details about how to specify
# container command for worker Pod.
command: []
args: []
topologySpreadConstraints: []
# Custom pod DNS configuration
# See https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config
# dnsConfig:
# nameservers:
# - 8.8.8.8
# searches:
# - example.local
# options:
# - name: ndots
# value: "2"
# - name: edns0
# The map's key is used as the groupName.
# For example, key:small-group in the map below
# will be used as the groupName
additionalWorkerGroups:
smallGroup:
# Disabled by default
disabled: true
replicas: 0
minReplicas: 0
maxReplicas: 3
labels: {}
serviceAccountName: ""
restartPolicy: ""
rayStartParams: {}
# 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;
# we don't recommend allocating less than 8G memory for a Ray pod in production.
# Ray pods should be sized to take up entire K8s nodes when possible.
# Always set CPU and memory limits for Ray pods.
# It is usually best to set requests equal to limits.
# See https://docs.ray.io/en/latest/cluster/kubernetes/user-guides/config.html#resources
# for further guidance.
resources:
limits:
cpu: 1
memory: "1G"
requests:
cpu: 1
memory: "1G"
annotations: {}
nodeSelector: {}
tolerations: []
affinity: {}
# Pod security context.
podSecurityContext: {}
# Ray container security context.
securityContext: {}
# Optional: The following volumes/volumeMounts configurations are optional but recommended because
# Ray writes logs to /tmp/ray/session_latests/logs instead of stdout/stderr.
volumes:
- name: log-volume
hostPath:
path: /opt/datamate/data/log
type: DirectoryOrCreate
- name: dataset-volume
hostPath:
path: /opt/datamate/data/dataset
type: DirectoryOrCreate
- name: flow-volume
hostPath:
path: /opt/datamate/data/flow
type: DirectoryOrCreate
volumeMounts:
- mountPath: /tmp/ray
name: log-volume
subPath: ray
- mountPath: /dataset
name: dataset-volume
- mountPath: /flow
name: flow-volume
sidecarContainers: []
# See docs/guidance/pod-command.md for more details about how to specify
# container command for worker Pod.
command: []
args: []
# Topology Spread Constraints for worker pods
# See: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/
topologySpreadConstraints: []
# Custom pod DNS configuration
# See https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config
# dnsConfig:
# nameservers:
# - 8.8.8.8
# searches:
# - example.local
# options:
# - name: ndots
# value: "2"
# - name: edns0
# Configuration for Head's Kubernetes Service
service:
# This is optional, and the default is ClusterIP.
type: NodePort