diff --git a/docs/reference/api.md b/docs/reference/api.md
index 5d0a2ed062..eb72b80c8b 100644
--- a/docs/reference/api.md
+++ b/docs/reference/api.md
@@ -209,7 +209,7 @@ _Appears in:_
| `serviceUnhealthySecondThreshold` _integer_ | Deprecated: This field is not used anymore. ref: https://github.com/ray-project/kuberay/issues/1685 | | |
| `deploymentUnhealthySecondThreshold` _integer_ | Deprecated: This field is not used anymore. ref: https://github.com/ray-project/kuberay/issues/1685 | | |
| `serveService` _[Service](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#service-v1-core)_ | ServeService is the Kubernetes service for head node and worker nodes who have healthy http proxy to serve traffics. | | |
-| `upgradeStrategy` _[RayServiceUpgradeStrategy](#rayserviceupgradestrategy)_ | UpgradeStrategy represents the strategy used when upgrading the RayService. Currently supports `NewCluster` and `None` | | |
+| `upgradeStrategy` _[RayServiceUpgradeStrategy](#rayserviceupgradestrategy)_ | UpgradeStrategy defines the scaling policy used when upgrading the RayService. | | |
| `serveConfigV2` _string_ | Important: Run "make" to regenerate code after modifying this file
Defines the applications and deployments to deploy, should be a YAML multi-line scalar string. | | |
| `rayClusterConfig` _[RayClusterSpec](#rayclusterspec)_ | | | |
| `excludeHeadPodFromServeSvc` _boolean_ | If the field is set to true, the value of the label `ray.io/serve` on the head Pod should always be false.
Therefore, the head Pod's endpoint will not be added to the Kubernetes Serve service. | | |
@@ -219,7 +219,7 @@ _Appears in:_
#### RayServiceUpgradeStrategy
-_Underlying type:_ _string_
+
@@ -228,6 +228,22 @@ _Underlying type:_ _string_
_Appears in:_
- [RayServiceSpec](#rayservicespec)
+| Field | Description | Default | Validation |
+| --- | --- | --- | --- |
+| `type` _[RayServiceUpgradeType](#rayserviceupgradetype)_ | Type represents the strategy used when upgrading the RayService. Currently supports `NewCluster` and `None`. | | |
+
+
+#### RayServiceUpgradeType
+
+_Underlying type:_ _string_
+
+
+
+
+
+_Appears in:_
+- [RayServiceUpgradeStrategy](#rayserviceupgradestrategy)
+
#### ScaleStrategy
diff --git a/helm-chart/kuberay-operator/crds/ray.io_rayservices.yaml b/helm-chart/kuberay-operator/crds/ray.io_rayservices.yaml
index 1c11cc038e..9d91430966 100644
--- a/helm-chart/kuberay-operator/crds/ray.io_rayservices.yaml
+++ b/helm-chart/kuberay-operator/crds/ray.io_rayservices.yaml
@@ -7944,7 +7944,10 @@ spec:
format: int32
type: integer
upgradeStrategy:
- type: string
+ properties:
+ type:
+ type: string
+ type: object
type: object
status:
properties:
diff --git a/ray-operator/apis/ray/v1/rayservice_types.go b/ray-operator/apis/ray/v1/rayservice_types.go
index b81d9cbc8d..2ff77aaebf 100644
--- a/ray-operator/apis/ray/v1/rayservice_types.go
+++ b/ray-operator/apis/ray/v1/rayservice_types.go
@@ -20,13 +20,13 @@ const (
FailedToUpdateService ServiceStatus = "FailedToUpdateService"
)
-type RayServiceUpgradeStrategy string
+type RayServiceUpgradeType string
const (
// During upgrade, NewCluster strategy will create new upgraded cluster and switch to it when it becomes ready
- NewCluster RayServiceUpgradeStrategy = "NewCluster"
+ NewCluster RayServiceUpgradeType = "NewCluster"
// No new cluster will be created while the strategy is set to None
- None RayServiceUpgradeStrategy = "None"
+ None RayServiceUpgradeType = "None"
)
// These statuses should match Ray Serve's application statuses
@@ -58,6 +58,11 @@ var DeploymentStatusEnum = struct {
UNHEALTHY: "UNHEALTHY",
}
+type RayServiceUpgradeStrategy struct {
+ // Type represents the strategy used when upgrading the RayService. Currently supports `NewCluster` and `None`.
+ Type *RayServiceUpgradeType `json:"type,omitempty"`
+}
+
// RayServiceSpec defines the desired state of RayService
type RayServiceSpec struct {
// Deprecated: This field is not used anymore. ref: https://github.com/ray-project/kuberay/issues/1685
@@ -66,7 +71,7 @@ type RayServiceSpec struct {
DeploymentUnhealthySecondThreshold *int32 `json:"deploymentUnhealthySecondThreshold,omitempty"`
// ServeService is the Kubernetes service for head node and worker nodes who have healthy http proxy to serve traffics.
ServeService *corev1.Service `json:"serveService,omitempty"`
- // UpgradeStrategy represents the strategy used when upgrading the RayService. Currently supports `NewCluster` and `None`
+ // UpgradeStrategy defines the scaling policy used when upgrading the RayService.
UpgradeStrategy *RayServiceUpgradeStrategy `json:"upgradeStrategy,omitempty"`
// Important: Run "make" to regenerate code after modifying this file
// Defines the applications and deployments to deploy, should be a YAML multi-line scalar string.
diff --git a/ray-operator/apis/ray/v1/zz_generated.deepcopy.go b/ray-operator/apis/ray/v1/zz_generated.deepcopy.go
index 586c39ac5a..9c864364cd 100644
--- a/ray-operator/apis/ray/v1/zz_generated.deepcopy.go
+++ b/ray-operator/apis/ray/v1/zz_generated.deepcopy.go
@@ -536,7 +536,7 @@ func (in *RayServiceSpec) DeepCopyInto(out *RayServiceSpec) {
if in.UpgradeStrategy != nil {
in, out := &in.UpgradeStrategy, &out.UpgradeStrategy
*out = new(RayServiceUpgradeStrategy)
- **out = **in
+ (*in).DeepCopyInto(*out)
}
in.RayClusterSpec.DeepCopyInto(&out.RayClusterSpec)
}
@@ -595,6 +595,26 @@ func (in *RayServiceStatuses) DeepCopy() *RayServiceStatuses {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *RayServiceUpgradeStrategy) DeepCopyInto(out *RayServiceUpgradeStrategy) {
+ *out = *in
+ if in.Type != nil {
+ in, out := &in.Type, &out.Type
+ *out = new(RayServiceUpgradeType)
+ **out = **in
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RayServiceUpgradeStrategy.
+func (in *RayServiceUpgradeStrategy) DeepCopy() *RayServiceUpgradeStrategy {
+ if in == nil {
+ return nil
+ }
+ out := new(RayServiceUpgradeStrategy)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ScaleStrategy) DeepCopyInto(out *ScaleStrategy) {
*out = *in
diff --git a/ray-operator/config/crd/bases/ray.io_rayservices.yaml b/ray-operator/config/crd/bases/ray.io_rayservices.yaml
index 1c11cc038e..9d91430966 100644
--- a/ray-operator/config/crd/bases/ray.io_rayservices.yaml
+++ b/ray-operator/config/crd/bases/ray.io_rayservices.yaml
@@ -7944,7 +7944,10 @@ spec:
format: int32
type: integer
upgradeStrategy:
- type: string
+ properties:
+ type:
+ type: string
+ type: object
type: object
status:
properties:
diff --git a/ray-operator/controllers/ray/rayservice_controller.go b/ray-operator/controllers/ray/rayservice_controller.go
index 52aad6c304..3583f65e17 100644
--- a/ray-operator/controllers/ray/rayservice_controller.go
+++ b/ray-operator/controllers/ray/rayservice_controller.go
@@ -247,10 +247,12 @@ func validateRayServiceSpec(rayService *rayv1.RayService) error {
if headSvc := rayService.Spec.RayClusterSpec.HeadGroupSpec.HeadService; headSvc != nil && headSvc.Name != "" {
return fmt.Errorf("spec.rayClusterConfig.headGroupSpec.headService.metadata.name should not be set")
}
-
- if upgradeStrategy := rayService.Spec.UpgradeStrategy; upgradeStrategy != nil {
- if *upgradeStrategy != rayv1.NewCluster && *upgradeStrategy != rayv1.None {
- return fmt.Errorf("spec.UpgradeStrategy value %s is invalid, valid options are %s or %s", *upgradeStrategy, rayv1.NewCluster, rayv1.None)
+ if rayService.Spec.UpgradeStrategy == nil {
+ return nil
+ }
+ if upgradeType := rayService.Spec.UpgradeStrategy.Type; upgradeType != nil {
+ if *upgradeType != rayv1.NewCluster && *upgradeType != rayv1.None {
+ return fmt.Errorf("Spec.UpgradeStrategy.Type value %s is invalid, valid options are %s or %s", *upgradeType, rayv1.NewCluster, rayv1.None)
}
}
return nil
@@ -430,24 +432,27 @@ func (r *RayServiceReconciler) reconcileRayCluster(ctx context.Context, rayServi
// For LLM serving, some users might not have sufficient GPU resources to run two RayClusters simultaneously.
// Therefore, KubeRay offers ENABLE_ZERO_DOWNTIME as a feature flag for zero-downtime upgrades.
zeroDowntimeEnvVar := os.Getenv(ENABLE_ZERO_DOWNTIME)
- rayServiceSpecUpgradeStrategy := rayServiceInstance.Spec.UpgradeStrategy
- // There are two ways to enable zero downtime upgrade. Through ENABLE_ZERO_DOWNTIME env var or setting Spec.UpgradeStrategy.
+ var rayServiceSpecUpgradeType *rayv1.RayServiceUpgradeType
+ if rayServiceInstance.Spec.UpgradeStrategy != nil {
+ rayServiceSpecUpgradeType = rayServiceInstance.Spec.UpgradeStrategy.Type
+ }
+ // There are two ways to enable zero downtime upgrade. Through ENABLE_ZERO_DOWNTIME env var or setting Spec.UpgradeStrategy.Type.
// If no fields are set, zero downtime upgrade by default is enabled.
- // Spec.UpgradeStrategy takes precedence over ENABLE_ZERO_DOWNTIME.
+ // Spec.UpgradeStrategy.Type takes precedence over ENABLE_ZERO_DOWNTIME.
enableZeroDowntime := true
- strategyMessage := ""
+ typeMessage := ""
if zeroDowntimeEnvVar != "" {
enableZeroDowntime = strings.ToLower(zeroDowntimeEnvVar) != "false"
- strategyMessage = fmt.Sprintf("ENABLE_ZERO_DOWNTIME environmental variable is set to %q", strings.ToLower(zeroDowntimeEnvVar))
+ typeMessage = fmt.Sprintf("ENABLE_ZERO_DOWNTIME environmental variable is set to %q", strings.ToLower(zeroDowntimeEnvVar))
}
- if rayServiceSpecUpgradeStrategy != nil {
- enableZeroDowntime = *rayServiceSpecUpgradeStrategy == rayv1.NewCluster
- strategyMessage = fmt.Sprintf("Upgrade Strategy is set to %q", *rayServiceSpecUpgradeStrategy)
+ if rayServiceSpecUpgradeType != nil {
+ enableZeroDowntime = *rayServiceSpecUpgradeType == rayv1.NewCluster
+ typeMessage = fmt.Sprintf("Upgrade Type is set to %q", *rayServiceSpecUpgradeType)
}
if enableZeroDowntime || !enableZeroDowntime && activeRayCluster == nil {
if enableZeroDowntime && activeRayCluster != nil {
- r.Recorder.Event(rayServiceInstance, "Normal", "UpgradeStrategy", strategyMessage)
+ r.Recorder.Event(rayServiceInstance, "Normal", "UpgradeStrategy.Type", typeMessage)
}
// Add a pending cluster name. In the next reconcile loop, shouldPrepareNewRayCluster will return DoNothing and we will
// actually create the pending RayCluster instance.
diff --git a/ray-operator/controllers/ray/rayservice_controller_unit_test.go b/ray-operator/controllers/ray/rayservice_controller_unit_test.go
index 7fd2ccf297..c97f96f247 100644
--- a/ray-operator/controllers/ray/rayservice_controller_unit_test.go
+++ b/ray-operator/controllers/ray/rayservice_controller_unit_test.go
@@ -47,13 +47,15 @@ func TestValidateRayServiceSpec(t *testing.T) {
})
assert.NoError(t, err, "The RayService spec is valid.")
- var upgradeStrat rayv1.RayServiceUpgradeStrategy = "invalidStrategy"
+ var upgradeStrat rayv1.RayServiceUpgradeType = "invalidStrategy"
err = validateRayServiceSpec(&rayv1.RayService{
Spec: rayv1.RayServiceSpec{
- UpgradeStrategy: &upgradeStrat,
+ UpgradeStrategy: &rayv1.RayServiceUpgradeStrategy{
+ Type: &upgradeStrat,
+ },
},
})
- assert.Error(t, err, "spec.UpgradeStrategy is invalid")
+ assert.Error(t, err, "spec.UpgradeSpec.Type is invalid")
}
func TestGenerateHashWithoutReplicasAndWorkersToDelete(t *testing.T) {
@@ -771,13 +773,13 @@ func TestReconcileRayCluster(t *testing.T) {
}
tests := map[string]struct {
- activeCluster *rayv1.RayCluster
- rayServiceUpgradeStrategy rayv1.RayServiceUpgradeStrategy
- kubeRayVersion string
- updateRayClusterSpec bool
- enableZeroDowntime bool
- shouldPrepareNewCluster bool
- updateKubeRayVersion bool
+ activeCluster *rayv1.RayCluster
+ rayServiceUpgradeType rayv1.RayServiceUpgradeType
+ kubeRayVersion string
+ updateRayClusterSpec bool
+ enableZeroDowntime bool
+ shouldPrepareNewCluster bool
+ updateKubeRayVersion bool
}{
// Test 1: Neither active nor pending clusters exist. The `markRestart` function will be called, so the `PendingServiceStatus.RayClusterName` should be set.
"Zero-downtime upgrade is enabled. Neither active nor pending clusters exist.": {
@@ -827,42 +829,42 @@ func TestReconcileRayCluster(t *testing.T) {
},
// Test 7: Zero downtime upgrade is enabled, but is enabled through the RayServiceSpec
"Zero-downtime upgrade enabled. The active cluster exist. Zero-downtime upgrade is triggered through RayServiceSpec.": {
- activeCluster: activeCluster.DeepCopy(),
- updateRayClusterSpec: true,
- enableZeroDowntime: true,
- shouldPrepareNewCluster: true,
- rayServiceUpgradeStrategy: rayv1.NewCluster,
+ activeCluster: activeCluster.DeepCopy(),
+ updateRayClusterSpec: true,
+ enableZeroDowntime: true,
+ shouldPrepareNewCluster: true,
+ rayServiceUpgradeType: rayv1.NewCluster,
},
// Test 8: Zero downtime upgrade is enabled. Env var is set to false but RayServiceSpec is set to NewCluster. Trigger the zero-downtime upgrade.
"Zero-downtime upgrade is enabled through RayServiceSpec and not through env var. Active cluster exist. Trigger the zero-downtime upgrade.": {
- activeCluster: activeCluster.DeepCopy(),
- updateRayClusterSpec: true,
- enableZeroDowntime: false,
- shouldPrepareNewCluster: true,
- rayServiceUpgradeStrategy: rayv1.NewCluster,
+ activeCluster: activeCluster.DeepCopy(),
+ updateRayClusterSpec: true,
+ enableZeroDowntime: false,
+ shouldPrepareNewCluster: true,
+ rayServiceUpgradeType: rayv1.NewCluster,
},
// Test 9: Zero downtime upgrade is disabled. Env var is set to true but RayServiceSpec is set to None.
"Zero-downtime upgrade is disabled. Env var is set to true but RayServiceSpec is set to None.": {
- activeCluster: activeCluster.DeepCopy(),
- updateRayClusterSpec: true,
- enableZeroDowntime: true,
- shouldPrepareNewCluster: false,
- rayServiceUpgradeStrategy: rayv1.None,
+ activeCluster: activeCluster.DeepCopy(),
+ updateRayClusterSpec: true,
+ enableZeroDowntime: true,
+ shouldPrepareNewCluster: false,
+ rayServiceUpgradeType: rayv1.None,
},
// Test 10: Zero downtime upgrade is enabled. Neither the env var nor the RayServiceSpec is set. Trigger the zero-downtime upgrade.
"Zero-downtime upgrade is enabled. Neither the env var nor the RayServiceSpec is set.": {
- activeCluster: nil,
- updateRayClusterSpec: true,
- shouldPrepareNewCluster: true,
- rayServiceUpgradeStrategy: "",
+ activeCluster: nil,
+ updateRayClusterSpec: true,
+ shouldPrepareNewCluster: true,
+ rayServiceUpgradeType: "",
},
// Test 11: Zero downtime upgrade is disabled. Both the env var and the RayServiceSpec is set to disable zero-downtime upgrade.
"Zero-downtime upgrade is disabled by both env var and RayServiceSpec.": {
- activeCluster: activeCluster.DeepCopy(),
- updateRayClusterSpec: true,
- enableZeroDowntime: false,
- shouldPrepareNewCluster: false,
- rayServiceUpgradeStrategy: rayv1.None,
+ activeCluster: activeCluster.DeepCopy(),
+ updateRayClusterSpec: true,
+ enableZeroDowntime: false,
+ shouldPrepareNewCluster: false,
+ rayServiceUpgradeType: rayv1.None,
},
}
@@ -888,8 +890,9 @@ func TestReconcileRayCluster(t *testing.T) {
Recorder: record.NewFakeRecorder(1),
}
service := rayService.DeepCopy()
- if tc.rayServiceUpgradeStrategy != "" {
- service.Spec.UpgradeStrategy = &tc.rayServiceUpgradeStrategy
+ service.Spec.UpgradeStrategy = &rayv1.RayServiceUpgradeStrategy{}
+ if tc.rayServiceUpgradeType != "" {
+ service.Spec.UpgradeStrategy.Type = &tc.rayServiceUpgradeType
}
if tc.updateRayClusterSpec {
service.Spec.RayClusterSpec.RayVersion = "new-version"
diff --git a/ray-operator/pkg/client/applyconfiguration/ray/v1/rayservicespec.go b/ray-operator/pkg/client/applyconfiguration/ray/v1/rayservicespec.go
index e98ee45ca3..f51872bdf7 100644
--- a/ray-operator/pkg/client/applyconfiguration/ray/v1/rayservicespec.go
+++ b/ray-operator/pkg/client/applyconfiguration/ray/v1/rayservicespec.go
@@ -3,20 +3,19 @@
package v1
import (
- rayv1 "github.com/ray-project/kuberay/ray-operator/apis/ray/v1"
v1 "k8s.io/api/core/v1"
)
// RayServiceSpecApplyConfiguration represents an declarative configuration of the RayServiceSpec type for use
// with apply.
type RayServiceSpecApplyConfiguration struct {
- ServiceUnhealthySecondThreshold *int32 `json:"serviceUnhealthySecondThreshold,omitempty"`
- DeploymentUnhealthySecondThreshold *int32 `json:"deploymentUnhealthySecondThreshold,omitempty"`
- ServeService *v1.Service `json:"serveService,omitempty"`
- UpgradeStrategy *rayv1.RayServiceUpgradeStrategy `json:"upgradeStrategy,omitempty"`
- ServeConfigV2 *string `json:"serveConfigV2,omitempty"`
- RayClusterSpec *RayClusterSpecApplyConfiguration `json:"rayClusterConfig,omitempty"`
- ExcludeHeadPodFromServeSvc *bool `json:"excludeHeadPodFromServeSvc,omitempty"`
+ ServiceUnhealthySecondThreshold *int32 `json:"serviceUnhealthySecondThreshold,omitempty"`
+ DeploymentUnhealthySecondThreshold *int32 `json:"deploymentUnhealthySecondThreshold,omitempty"`
+ ServeService *v1.Service `json:"serveService,omitempty"`
+ UpgradeStrategy *RayServiceUpgradeStrategyApplyConfiguration `json:"upgradeStrategy,omitempty"`
+ ServeConfigV2 *string `json:"serveConfigV2,omitempty"`
+ RayClusterSpec *RayClusterSpecApplyConfiguration `json:"rayClusterConfig,omitempty"`
+ ExcludeHeadPodFromServeSvc *bool `json:"excludeHeadPodFromServeSvc,omitempty"`
}
// RayServiceSpecApplyConfiguration constructs an declarative configuration of the RayServiceSpec type for use with
@@ -52,8 +51,8 @@ func (b *RayServiceSpecApplyConfiguration) WithServeService(value v1.Service) *R
// WithUpgradeStrategy sets the UpgradeStrategy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the UpgradeStrategy field is set to the value of the last call.
-func (b *RayServiceSpecApplyConfiguration) WithUpgradeStrategy(value rayv1.RayServiceUpgradeStrategy) *RayServiceSpecApplyConfiguration {
- b.UpgradeStrategy = &value
+func (b *RayServiceSpecApplyConfiguration) WithUpgradeStrategy(value *RayServiceUpgradeStrategyApplyConfiguration) *RayServiceSpecApplyConfiguration {
+ b.UpgradeStrategy = value
return b
}
diff --git a/ray-operator/pkg/client/applyconfiguration/ray/v1/rayserviceupgradespec.go b/ray-operator/pkg/client/applyconfiguration/ray/v1/rayserviceupgradespec.go
new file mode 100644
index 0000000000..758e49dd2a
--- /dev/null
+++ b/ray-operator/pkg/client/applyconfiguration/ray/v1/rayserviceupgradespec.go
@@ -0,0 +1,27 @@
+// Code generated by applyconfiguration-gen. DO NOT EDIT.
+
+package v1
+
+import (
+ v1 "github.com/ray-project/kuberay/ray-operator/apis/ray/v1"
+)
+
+// RayServiceUpgradeSpecApplyConfiguration represents an declarative configuration of the RayServiceUpgradeSpec type for use
+// with apply.
+type RayServiceUpgradeSpecApplyConfiguration struct {
+ Type *v1.RayServiceUpgradeStrategy `json:"type,omitempty"`
+}
+
+// RayServiceUpgradeSpecApplyConfiguration constructs an declarative configuration of the RayServiceUpgradeSpec type for use with
+// apply.
+func RayServiceUpgradeSpec() *RayServiceUpgradeSpecApplyConfiguration {
+ return &RayServiceUpgradeSpecApplyConfiguration{}
+}
+
+// WithType sets the Type field in the declarative configuration to the given value
+// and returns the receiver, so that objects can be built by chaining "With" function invocations.
+// If called multiple times, the Type field is set to the value of the last call.
+func (b *RayServiceUpgradeSpecApplyConfiguration) WithType(value v1.RayServiceUpgradeStrategy) *RayServiceUpgradeSpecApplyConfiguration {
+ b.Type = &value
+ return b
+}
diff --git a/ray-operator/pkg/client/applyconfiguration/ray/v1/rayserviceupgradestrategy.go b/ray-operator/pkg/client/applyconfiguration/ray/v1/rayserviceupgradestrategy.go
new file mode 100644
index 0000000000..ecf111103e
--- /dev/null
+++ b/ray-operator/pkg/client/applyconfiguration/ray/v1/rayserviceupgradestrategy.go
@@ -0,0 +1,27 @@
+// Code generated by applyconfiguration-gen. DO NOT EDIT.
+
+package v1
+
+import (
+ v1 "github.com/ray-project/kuberay/ray-operator/apis/ray/v1"
+)
+
+// RayServiceUpgradeStrategyApplyConfiguration represents an declarative configuration of the RayServiceUpgradeStrategy type for use
+// with apply.
+type RayServiceUpgradeStrategyApplyConfiguration struct {
+ Type *v1.RayServiceUpgradeType `json:"type,omitempty"`
+}
+
+// RayServiceUpgradeStrategyApplyConfiguration constructs an declarative configuration of the RayServiceUpgradeStrategy type for use with
+// apply.
+func RayServiceUpgradeStrategy() *RayServiceUpgradeStrategyApplyConfiguration {
+ return &RayServiceUpgradeStrategyApplyConfiguration{}
+}
+
+// WithType sets the Type field in the declarative configuration to the given value
+// and returns the receiver, so that objects can be built by chaining "With" function invocations.
+// If called multiple times, the Type field is set to the value of the last call.
+func (b *RayServiceUpgradeStrategyApplyConfiguration) WithType(value v1.RayServiceUpgradeType) *RayServiceUpgradeStrategyApplyConfiguration {
+ b.Type = &value
+ return b
+}
diff --git a/ray-operator/pkg/client/applyconfiguration/utils.go b/ray-operator/pkg/client/applyconfiguration/utils.go
index 79e0a8cc1f..8be558f040 100644
--- a/ray-operator/pkg/client/applyconfiguration/utils.go
+++ b/ray-operator/pkg/client/applyconfiguration/utils.go
@@ -41,6 +41,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &rayv1.RayServiceStatusApplyConfiguration{}
case v1.SchemeGroupVersion.WithKind("RayServiceStatuses"):
return &rayv1.RayServiceStatusesApplyConfiguration{}
+ case v1.SchemeGroupVersion.WithKind("RayServiceUpgradeStrategy"):
+ return &rayv1.RayServiceUpgradeStrategyApplyConfiguration{}
case v1.SchemeGroupVersion.WithKind("ScaleStrategy"):
return &rayv1.ScaleStrategyApplyConfiguration{}
case v1.SchemeGroupVersion.WithKind("ServeDeploymentStatus"):