-
Notifications
You must be signed in to change notification settings - Fork 678
[Feature] Support JobDeploymentStatus as the deletion condition #4262
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
Changes from all commits
8c2132a
596ed83
f0766c4
6ced1b6
909fc40
378cc23
1c0cf0b
72ed628
aa8f8c1
1c6c28d
2386ea7
1d9d0a4
83eb5eb
69f28c5
36c989b
a3a82ff
0588f35
615fa88
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -140,13 +140,26 @@ type DeletionRule struct { | |
| } | ||
|
|
||
| // DeletionCondition specifies the trigger conditions for a deletion action. | ||
| // Exactly one of JobStatus or JobDeploymentStatus must be specified: | ||
| // - JobStatus (application-level): Match the Ray job execution status. | ||
| // - JobDeploymentStatus (infrastructure-level): Match the RayJob deployment lifecycle status. This is particularly useful for cleaning up resources when Ray jobs fail to be submitted. | ||
| // | ||
| // +kubebuilder:validation:XValidation:rule="!(has(self.jobStatus) && has(self.jobDeploymentStatus))",message="JobStatus and JobDeploymentStatus cannot be used together within the same deletion condition." | ||
| // +kubebuilder:validation:XValidation:rule="has(self.jobStatus) || has(self.jobDeploymentStatus)",message="the deletion condition requires either the JobStatus or the JobDeploymentStatus field." | ||
| type DeletionCondition struct { | ||
| // JobStatus is the terminal status of the RayJob that triggers this condition. This field is required. | ||
| // JobStatus is the terminal status of the RayJob that triggers this condition. | ||
| // For the initial implementation, only "SUCCEEDED" and "FAILED" are supported. | ||
| // +kubebuilder:validation:Enum=SUCCEEDED;FAILED | ||
| JobStatus JobStatus `json:"jobStatus"` | ||
| // +optional | ||
| JobStatus *JobStatus `json:"jobStatus,omitempty"` | ||
|
|
||
| // JobDeploymentStatus is the terminal status of the RayJob deployment that triggers this condition. | ||
| // For the initial implementation, only "Failed" is supported. | ||
| // +kubebuilder:validation:Enum=Failed | ||
| // +optional | ||
| JobDeploymentStatus *JobDeploymentStatus `json:"jobDeploymentStatus,omitempty"` | ||
|
Comment on lines
+156
to
+160
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For now, we only support |
||
|
|
||
| // TTLSeconds is the time in seconds from when the JobStatus | ||
| // TTLSeconds is the time in seconds from when the JobStatus or JobDeploymentStatus | ||
| // reaches the specified terminal state to when this deletion action should be triggered. | ||
| // The value must be a non-negative integer. | ||
| // +kubebuilder:default=0 | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.