Skip to content

Commit 472100b

Browse files
The workerReplicas parameter has been made an optional field
Signed-off-by: LiZhenCheng9527 <[email protected]>
1 parent b706dd7 commit 472100b

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

charts/kthena/charts/workload/crds/workload.serving.volcano.sh_modelservings.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8857,6 +8857,7 @@ spec:
88578857
format: int32
88588858
type: integer
88598859
workerReplicas:
8860+
default: 0
88608861
description: |-
88618862
WorkerReplicas defines the number for the worker pod of a role.
88628863
Required: Need to set the number of worker-pod replicas.
@@ -17495,7 +17496,6 @@ spec:
1749517496
required:
1749617497
- entryTemplate
1749717498
- name
17498-
- workerReplicas
1749917499
type: object
1750017500
maxItems: 4
1750117501
minItems: 1

docs/kthena/docs/reference/crd/workload.serving.volcano.sh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ _Appears in:_
661661
| `name` _string_ | The name of a role. Name must be unique within an ServingGroup | | MaxLength: 12 <br />Pattern: `^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$` <br /> |
662662
| `replicas` _integer_ | The number of a certain role.<br />For example, in Disaggregated Prefilling, setting the replica count for both the P and D roles to 1 results in 1P1D deployment configuration.<br />This approach can similarly be applied to configure a xPyD deployment scenario.<br />Default to 1. | 1 | |
663663
| `entryTemplate` _[PodTemplateSpec](#podtemplatespec)_ | EntryTemplate defines the template for the entry pod of a role.<br />Required: Currently, a role must have only one entry-pod. | | |
664-
| `workerReplicas` _integer_ | WorkerReplicas defines the number for the worker pod of a role.<br />Required: Need to set the number of worker-pod replicas. | | |
664+
| `workerReplicas` _integer_ | WorkerReplicas defines the number for the worker pod of a role.<br />Required: Need to set the number of worker-pod replicas. | 0 | |
665665
| `workerTemplate` _[PodTemplateSpec](#podtemplatespec)_ | WorkerTemplate defines the template for the worker pod of a role. | | |
666666

667667

pkg/apis/workload/v1alpha1/servinggroup_types.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ type Role struct {
7272

7373
// WorkerReplicas defines the number for the worker pod of a role.
7474
// Required: Need to set the number of worker-pod replicas.
75-
WorkerReplicas int32 `json:"workerReplicas"`
75+
// +optional
76+
// +kubebuilder:default=0
77+
WorkerReplicas int32 `json:"workerReplicas,omitempty"`
7678

7779
// WorkerTemplate defines the template for the worker pod of a role.
7880
// +optional

pkg/model-serving-controller/controller/model_serving_controller_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3765,10 +3765,8 @@ func TestManageHeadlessService(t *testing.T) {
37653765
Template: workloadv1alpha1.ServingGroup{
37663766
Roles: []workloadv1alpha1.Role{
37673767
{
3768-
Name: "prefill",
3769-
Replicas: ptr.To[int32](1),
3770-
WorkerReplicas: 0,
3771-
WorkerTemplate: nil, // No worker template
3768+
Name: "prefill",
3769+
Replicas: ptr.To[int32](1),
37723770
},
37733771
},
37743772
},

0 commit comments

Comments
 (0)