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

Add NumOfHosts to WorkerGroupSpec (CRD change only) #1834

Merged
merged 5 commits into from
Jan 17, 2024
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
1 change: 1 addition & 0 deletions docs/reference/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ _Appears in:_
| `replicas` _integer_ | Replicas is the number of desired Pods for this worker group. See https://github.com/ray-project/kuberay/pull/1443 for more details about the reason for making this field optional. |
| `minReplicas` _integer_ | MinReplicas denotes the minimum number of desired Pods for this worker group. |
| `maxReplicas` _integer_ | MaxReplicas denotes the maximum number of desired Pods for this worker group, and the default value is maxInt32. |
| `numOfHosts` _integer_ | NumOfHosts denotes the number of hosts to create per replica. The default value is 1. |
| `rayStartParams` _object (keys:string, values:string)_ | RayStartParams are the params of the start command: address, object-store-memory, ... |
| `template` _[PodTemplateSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#podtemplatespec-v1-core)_ | Template is a pod template for the worker |
| `scaleStrategy` _[ScaleStrategy](#scalestrategy)_ | ScaleStrategy defines which pods to remove |
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/kuberay-operator/crds/ray.io_rayclusters.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions helm-chart/kuberay-operator/crds/ray.io_rayjobs.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions helm-chart/kuberay-operator/crds/ray.io_rayservices.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions ray-operator/apis/ray/v1/raycluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ type WorkerGroupSpec struct {
// MaxReplicas denotes the maximum number of desired Pods for this worker group, and the default value is maxInt32.
// +kubebuilder:default:=2147483647
MaxReplicas *int32 `json:"maxReplicas"`
// NumOfHosts denotes the number of hosts to create per replica. The default value is 1.
// +kubebuilder:default:=1
NumOfHosts int32 `json:"numOfHosts,omitempty"`
// RayStartParams are the params of the start command: address, object-store-memory, ...
RayStartParams map[string]string `json:"rayStartParams"`
// Template is a pod template for the worker
Expand Down
1 change: 1 addition & 0 deletions ray-operator/apis/ray/v1/raycluster_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ var myRayCluster = &RayCluster{
Replicas: pointer.Int32(3),
MinReplicas: pointer.Int32(0),
MaxReplicas: pointer.Int32(10000),
NumOfHosts: 1,
GroupName: "small-group",
RayStartParams: map[string]string{
"port": "6379",
Expand Down
4 changes: 3 additions & 1 deletion ray-operator/apis/ray/v1/rayjob_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ var expectedRayJob = RayJob{
Replicas: pointer.Int32(3),
MinReplicas: pointer.Int32(0),
MaxReplicas: pointer.Int32(10000),
NumOfHosts: 1,
GroupName: "small-group",
RayStartParams: map[string]string{
"port": "6379",
Expand Down Expand Up @@ -213,7 +214,8 @@ var testRayJobJSON = `{
"replicas": 3,
"minReplicas": 0,
"maxReplicas": 10000,
"rayStartParams": {
"numOfHosts": 1,
"rayStartParams": {
"num-cpus": "1",
"port": "6379"
},
Expand Down
4 changes: 3 additions & 1 deletion ray-operator/apis/ray/v1/rayservice_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ var myRayService = &RayService{
Replicas: pointer.Int32(3),
MinReplicas: pointer.Int32(0),
MaxReplicas: pointer.Int32(10000),
NumOfHosts: 1,
GroupName: "small-group",
RayStartParams: map[string]string{
"port": "6379",
Expand Down Expand Up @@ -211,7 +212,8 @@ var expected = `{
"replicas":3,
"minReplicas":0,
"maxReplicas":10000,
"rayStartParams":{
"numOfHosts":1,
"rayStartParams":{
"dashboard-agent-listen-port":"52365",
"num-cpus":"1",
"port":"6379"
Expand Down
4 changes: 4 additions & 0 deletions ray-operator/config/crd/bases/ray.io_rayclusters.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions ray-operator/config/crd/bases/ray.io_rayjobs.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions ray-operator/config/crd/bases/ray.io_rayservices.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading