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

Make replicas optional for the worker spec #1154

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def build_worker(
memory_requests: str = "1G",
cpu_limits: str = "2",
memory_limits: str = "2G",
replicas: int = 1,
replicas: int = 0,
min_replicas: int = -1,
max_replicas: int = -1,
ray_start_params: dict = {},
Expand All @@ -143,7 +143,7 @@ def build_worker(
- memory_requests (str, optional): Memory requests for the worker pods. Default is "1G".
- cpu_limits (str, optional): CPU limits for the worker pods. Default is "2".
- memory_limits (str, optional): Memory limits for the worker pods. Default is "2G".
- replicas (int, optional): Number of worker pods to run. Default is 1.
- replicas (int, optional): Number of worker pods to run. Default is 0.
- min_replicas (int, optional): Minimum number of worker pods to run. Default is -1.
- max_replicas (int, optional): Maximum number of worker pods to run. Default is -1.
- ray_start_params (dict, optional): Additional parameters to pass to the ray start command. Default is {}.
Expand Down
1 change: 0 additions & 1 deletion helm-chart/kuberay-operator/crds/ray.io_rayclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11568,7 +11568,6 @@ spec:
- maxReplicas
- minReplicas
- rayStartParams
- replicas
- template
type: object
type: array
Expand Down
1 change: 0 additions & 1 deletion helm-chart/kuberay-operator/crds/ray.io_rayjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12082,7 +12082,6 @@ spec:
- maxReplicas
- minReplicas
- rayStartParams
- replicas
- template
type: object
type: array
Expand Down
1 change: 0 additions & 1 deletion helm-chart/kuberay-operator/crds/ray.io_rayservices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12068,7 +12068,6 @@ spec:
- maxReplicas
- minReplicas
- rayStartParams
- replicas
- template
type: object
type: array
Expand Down
2 changes: 1 addition & 1 deletion ray-operator/apis/ray/v1alpha1/raycluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type WorkerGroupSpec struct {
GroupName string `json:"groupName"`
// Replicas Number of desired pods in this pod group. This is a pointer to distinguish between explicit
// zero and not specified. Defaults to 1.
Replicas *int32 `json:"replicas"`
Replicas *int32 `json:"replicas,omitempty"`
// MinReplicas defaults to 1
MinReplicas *int32 `json:"minReplicas"`
// MaxReplicas defaults to maxInt32
Expand Down
1 change: 0 additions & 1 deletion ray-operator/config/crd/bases/ray.io_rayclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11568,7 +11568,6 @@ spec:
- maxReplicas
- minReplicas
- rayStartParams
- replicas
- template
type: object
type: array
Expand Down
1 change: 0 additions & 1 deletion ray-operator/config/crd/bases/ray.io_rayjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12082,7 +12082,6 @@ spec:
- maxReplicas
- minReplicas
- rayStartParams
- replicas
- template
type: object
type: array
Expand Down
1 change: 0 additions & 1 deletion ray-operator/config/crd/bases/ray.io_rayservices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12068,7 +12068,6 @@ spec:
- maxReplicas
- minReplicas
- rayStartParams
- replicas
- template
type: object
type: array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ spec:
command: ["/bin/sh","-c","ray stop"]
workerGroupSpecs:
# the pod replicas in this group typed worker
- replicas: 1
minReplicas: 1
- minReplicas: 1
maxReplicas: 10
# logical group name, for this called large-group, also can be functional
groupName: large-group
Expand Down
3 changes: 1 addition & 2 deletions ray-operator/config/samples/ray-cluster.autoscaler.tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ spec:
path: gencert_head.sh
workerGroupSpecs:
# the pod replicas in this group typed worker
- replicas: 1
minReplicas: 1
- minReplicas: 1
maxReplicas: 10
groupName: small-group
# The `rayStartParams` are used to configure the `ray start` command.
Expand Down
3 changes: 1 addition & 2 deletions ray-operator/config/samples/ray-cluster.autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ spec:
memory: "2G"
workerGroupSpecs:
# the pod replicas in this group typed worker
- replicas: 1
minReplicas: 1
- minReplicas: 1
maxReplicas: 10
# logical group name, for this called small-group, also can be functional
groupName: small-group
Expand Down
3 changes: 1 addition & 2 deletions ray-operator/config/samples/ray-service.autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ spec:
name: serve
workerGroupSpecs:
# the pod replicas in this group typed worker
- replicas: 1
minReplicas: 1
- minReplicas: 1
maxReplicas: 5
# logical group name, for this called small-group, also can be functional
groupName: small-group
Expand Down