Skip to content

Commit

Permalink
make queue immutable
Browse files Browse the repository at this point in the history
Signed-off-by: Weiyu Yen <[email protected]>
  • Loading branch information
ckyuto committed May 28, 2024
1 parent 26b7bfa commit 7597718
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 1 deletion.
3 changes: 3 additions & 0 deletions manifests/base/crds/kubeflow.org_mpijobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7330,6 +7330,9 @@ spec:
type: string
queue:
type: string
x-kubernetes-validations:
- message: spec.runPolicy.schedulingPolicy.queue is immutable
rule: self == oldSelf
scheduleTimeoutSeconds:
format: int32
type: integer
Expand Down
3 changes: 3 additions & 0 deletions manifests/base/crds/kubeflow.org_mxjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7333,6 +7333,9 @@ spec:
type: string
queue:
type: string
x-kubernetes-validations:
- message: spec.runPolicy.schedulingPolicy.queue is immutable
rule: self == oldSelf
scheduleTimeoutSeconds:
format: int32
type: integer
Expand Down
3 changes: 3 additions & 0 deletions manifests/base/crds/kubeflow.org_paddlejobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7812,6 +7812,9 @@ spec:
type: string
queue:
type: string
x-kubernetes-validations:
- message: spec.runPolicy.schedulingPolicy.queue is immutable
rule: self == oldSelf
scheduleTimeoutSeconds:
format: int32
type: integer
Expand Down
3 changes: 3 additions & 0 deletions manifests/base/crds/kubeflow.org_pytorchjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7849,6 +7849,9 @@ spec:
type: string
queue:
type: string
x-kubernetes-validations:
- message: spec.runPolicy.schedulingPolicy.queue is immutable
rule: self == oldSelf
scheduleTimeoutSeconds:
format: int32
type: integer
Expand Down
3 changes: 3 additions & 0 deletions manifests/base/crds/kubeflow.org_tfjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ spec:
type: string
queue:
type: string
x-kubernetes-validations:
- message: spec.runPolicy.schedulingPolicy.queue is immutable
rule: self == oldSelf
scheduleTimeoutSeconds:
format: int32
type: integer
Expand Down
3 changes: 3 additions & 0 deletions manifests/base/crds/kubeflow.org_xgboostjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ spec:
type: string
queue:
type: string
x-kubernetes-validations:
- message: spec.runPolicy.schedulingPolicy.queue is immutable
rule: self == oldSelf
scheduleTimeoutSeconds:
format: int32
type: integer
Expand Down
3 changes: 2 additions & 1 deletion pkg/apis/kubeflow.org/v1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ type RunPolicy struct {
// SchedulingPolicy encapsulates various scheduling policies of the distributed training
// job, for example `minAvailable` for gang-scheduling.
type SchedulingPolicy struct {
MinAvailable *int32 `json:"minAvailable,omitempty"`
MinAvailable *int32 `json:"minAvailable,omitempty"`
// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="spec.runPolicy.schedulingPolicy.queue is immutable"
Queue string `json:"queue,omitempty"`
MinResources *map[v1.ResourceName]resource.Quantity `json:"minResources,omitempty"`
PriorityClass string `json:"priorityClass,omitempty"`
Expand Down

0 comments on commit 7597718

Please sign in to comment.