From 6c94f30673c04df80b602244fab1fe6580f15f73 Mon Sep 17 00:00:00 2001 From: Edward Oakes Date: Thu, 11 Aug 2022 19:15:54 -0500 Subject: [PATCH] [rayservice] Fix config names to match serve config format directly (#464) --- docs/guidance/rayservice.md | 4 ++-- helm-chart/kuberay-operator/crds/ray.io_rayservices.yaml | 4 ++-- ray-operator/apis/ray/v1alpha1/rayservice_types.go | 4 ++-- ray-operator/apis/ray/v1alpha1/rayservice_types_test.go | 4 ++-- ray-operator/config/crd/bases/ray.io_rayservices.yaml | 4 ++-- ray-operator/config/samples/ray_v1alpha1_rayservice.yaml | 4 ++-- tests/config/ray-service-cluster-update.yaml.template | 4 ++-- tests/config/ray-service-serve-update.yaml.template | 4 ++-- tests/config/ray-service.yaml.template | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/guidance/rayservice.md b/docs/guidance/rayservice.md index 9856e77035..8ab0ca6414 100644 --- a/docs/guidance/rayservice.md +++ b/docs/guidance/rayservice.md @@ -130,7 +130,7 @@ Then you can open your web browser with the url localhost:8265 to see your Ray d ### Update Ray Serve Deployment Graph -You can update the `serveDeploymentGraphConfig` in your RayService config file. +You can update the `serveConfig` in your RayService config file. For example, if you update the mango price to 4 in [ray_v1alpha1_rayservice.yaml](https://github.com/ray-project/kuberay/blob/master/ray-operator/config/samples/ray_v1alpha1_rayservice.yaml). ```shell - name: MangoStand @@ -226,4 +226,4 @@ Table (group by func_name): ### Delete the operator -`$ kubectl delete -k "github.com/ray-project/kuberay/ray-operator/config/default"` \ No newline at end of file +`$ kubectl delete -k "github.com/ray-project/kuberay/ray-operator/config/default"` diff --git a/helm-chart/kuberay-operator/crds/ray.io_rayservices.yaml b/helm-chart/kuberay-operator/crds/ray.io_rayservices.yaml index 3c50e92036..9413011093 100644 --- a/helm-chart/kuberay-operator/crds/ray.io_rayservices.yaml +++ b/helm-chart/kuberay-operator/crds/ray.io_rayservices.yaml @@ -11471,7 +11471,7 @@ spec: required: - headGroupSpec type: object - serveDeploymentGraphConfig: + serveConfig: description: 'Important: Run "make" to regenerate code after modifying this file' properties: @@ -11479,7 +11479,7 @@ spec: type: string runtimeEnv: type: string - serveConfigs: + deployments: items: description: ServeConfigSpec defines the desired state of RayService Reference to http://rayserve.org diff --git a/ray-operator/apis/ray/v1alpha1/rayservice_types.go b/ray-operator/apis/ray/v1alpha1/rayservice_types.go index f5795b49eb..2acd6391a8 100644 --- a/ray-operator/apis/ray/v1alpha1/rayservice_types.go +++ b/ray-operator/apis/ray/v1alpha1/rayservice_types.go @@ -24,7 +24,7 @@ const ( // RayServiceSpec defines the desired state of RayService type RayServiceSpec struct { // Important: Run "make" to regenerate code after modifying this file - ServeDeploymentGraphSpec ServeDeploymentGraphSpec `json:"serveDeploymentGraphConfig,omitempty"` + ServeDeploymentGraphSpec ServeDeploymentGraphSpec `json:"serveConfig,omitempty"` RayClusterSpec RayClusterSpec `json:"rayClusterConfig,omitempty"` ServiceUnhealthySecondThreshold *int32 `json:"serviceUnhealthySecondThreshold,omitempty"` DeploymentUnhealthySecondThreshold *int32 `json:"deploymentUnhealthySecondThreshold,omitempty"` @@ -33,7 +33,7 @@ type RayServiceSpec struct { type ServeDeploymentGraphSpec struct { ImportPath string `json:"importPath"` RuntimeEnv string `json:"runtimeEnv,omitempty"` - ServeConfigSpecs []ServeConfigSpec `json:"serveConfigs,omitempty"` + ServeConfigSpecs []ServeConfigSpec `json:"deployments,omitempty"` } // ServeConfigSpec defines the desired state of RayService diff --git a/ray-operator/apis/ray/v1alpha1/rayservice_types_test.go b/ray-operator/apis/ray/v1alpha1/rayservice_types_test.go index 645ffcd16e..d854d2fd31 100644 --- a/ray-operator/apis/ray/v1alpha1/rayservice_types_test.go +++ b/ray-operator/apis/ray/v1alpha1/rayservice_types_test.go @@ -195,10 +195,10 @@ var expected = `{ "creationTimestamp":null }, "spec":{ - "serveDeploymentGraphConfig":{ + "serveConfig":{ "importPath":"fruit.deployment_graph", "runtimeEnv":"working_dir:\n - \"https://github.com/ray-project/test_dag/archive/c620251044717ace0a4c19d766d43c5099af8a77.zip\"", - "serveConfigs":[ + "deployments":[ { "name":"MangoStand", "numReplicas":1, diff --git a/ray-operator/config/crd/bases/ray.io_rayservices.yaml b/ray-operator/config/crd/bases/ray.io_rayservices.yaml index 4135d985a1..4a1007b07a 100644 --- a/ray-operator/config/crd/bases/ray.io_rayservices.yaml +++ b/ray-operator/config/crd/bases/ray.io_rayservices.yaml @@ -11610,7 +11610,7 @@ spec: required: - headGroupSpec type: object - serveDeploymentGraphConfig: + serveConfig: description: 'Important: Run "make" to regenerate code after modifying this file' properties: @@ -11618,7 +11618,7 @@ spec: type: string runtimeEnv: type: string - serveConfigs: + deployments: items: description: ServeConfigSpec defines the desired state of RayService Reference to http://rayserve.org diff --git a/ray-operator/config/samples/ray_v1alpha1_rayservice.yaml b/ray-operator/config/samples/ray_v1alpha1_rayservice.yaml index 0b3978ed12..f1a12eae18 100644 --- a/ray-operator/config/samples/ray_v1alpha1_rayservice.yaml +++ b/ray-operator/config/samples/ray_v1alpha1_rayservice.yaml @@ -9,11 +9,11 @@ metadata: spec: serviceUnhealthySecondThreshold: 300 # Config for the health check threshold for service. Default value is 60. deploymentUnhealthySecondThreshold: 300 # Config for the health check threshold for deployments. Default value is 60. - serveDeploymentGraphConfig: + serveConfig: importPath: fruit.deployment_graph runtimeEnv: | working_dir: "https://github.com/ray-project/test_dag/archive/c620251044717ace0a4c19d766d43c5099af8a77.zip" - serveConfigs: + deployments: - name: MangoStand numReplicas: 1 userConfig: | diff --git a/tests/config/ray-service-cluster-update.yaml.template b/tests/config/ray-service-cluster-update.yaml.template index faacf620ea..63e936d1c7 100644 --- a/tests/config/ray-service-cluster-update.yaml.template +++ b/tests/config/ray-service-cluster-update.yaml.template @@ -5,11 +5,11 @@ metadata: spec: serviceUnhealthySecondThreshold: 300 deploymentUnhealthySecondThreshold: 300 - serveDeploymentGraphConfig: + serveConfig: importPath: fruit.deployment_graph runtimeEnv: | working_dir: "https://github.com/ray-project/test_dag/archive/c620251044717ace0a4c19d766d43c5099af8a77.zip" - serveConfigs: + deployments: - name: MangoStand numReplicas: 1 userConfig: | diff --git a/tests/config/ray-service-serve-update.yaml.template b/tests/config/ray-service-serve-update.yaml.template index 8296c8861d..b52b8ce753 100644 --- a/tests/config/ray-service-serve-update.yaml.template +++ b/tests/config/ray-service-serve-update.yaml.template @@ -5,11 +5,11 @@ metadata: spec: serviceUnhealthySecondThreshold: 300 deploymentUnhealthySecondThreshold: 300 - serveDeploymentGraphConfig: + serveConfig: importPath: fruit.deployment_graph runtimeEnv: | working_dir: "https://github.com/ray-project/test_dag/archive/c620251044717ace0a4c19d766d43c5099af8a77.zip" - serveConfigs: + deployments: - name: MangoStand numReplicas: 1 userConfig: | diff --git a/tests/config/ray-service.yaml.template b/tests/config/ray-service.yaml.template index eb485d4634..cc3be134e5 100644 --- a/tests/config/ray-service.yaml.template +++ b/tests/config/ray-service.yaml.template @@ -5,11 +5,11 @@ metadata: spec: serviceUnhealthySecondThreshold: 300 deploymentUnhealthySecondThreshold: 300 - serveDeploymentGraphConfig: + serveConfig: importPath: fruit.deployment_graph runtimeEnv: | working_dir: "https://github.com/ray-project/test_dag/archive/c620251044717ace0a4c19d766d43c5099af8a77.zip" - serveConfigs: + deployments: - name: MangoStand numReplicas: 1 userConfig: |