Files
ray-project--ray/python/ray/tests/kuberay/test_files/ray-cluster.autoscaler-template.yaml
2026-07-13 13:17:40 +08:00

74 lines
2.1 KiB
YAML

# `ray-cluster.autoscaler-template.yaml` is a template for the RayCluster CR and
# is used by the function `_get_ray_cr_config` in `test_autoscaling_e2e.py`.
# [Note]
# (1) The VM test runner only has 4 CPUs, so we lower the CPU requests.
# (2) `test_autoscaling_e2e.py` assumes that each Ray Pod has 1 logical CPU.
apiVersion: ray.io/v1
kind: RayCluster
metadata:
name: raycluster-autoscaler
spec:
# The version of Ray you are using. Make sure all Ray containers are running this version of Ray.
rayVersion: '2.46.0'
# If `enableInTreeAutoscaling` is true, the Autoscaler sidecar will be added to the Ray head pod.
# Ray Autoscaler integration is Beta with KubeRay >= 0.3.0 and Ray >= 2.0.0.
enableInTreeAutoscaling: true
autoscalerOptions:
upscalingMode: Default
idleTimeoutSeconds: 60
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: "500m"
memory: "512Mi"
requests:
cpu: "500m"
memory: "512Mi"
headGroupSpec:
template:
spec:
containers:
- name: ray-head
image: rayproject/ray:2.46.0
ports:
- containerPort: 6379
name: gcs
- containerPort: 8265
name: dashboard
- containerPort: 10001
name: client
imagePullPolicy: IfNotPresent
lifecycle:
preStop:
exec:
command: ["/bin/sh","-c","ray stop"]
resources:
limits:
cpu: "1"
memory: "2G"
requests:
cpu: "500m"
memory: "2G"
workerGroupSpecs:
- replicas: 1
minReplicas: 1
maxReplicas: 10
groupName: small-group
template:
spec:
containers:
- name: ray-worker
image: rayproject/ray:2.46.0
lifecycle:
preStop:
exec:
command: ["/bin/sh","-c","ray stop"]
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: "1"
memory: "1G"
requests:
cpu: "500m"
memory: "1G"