-
Notifications
You must be signed in to change notification settings - Fork 664
Closed
Labels
Description
Search before asking
- I had searched in the issues and found no similar feature requirement.
Description
Replace the RayCluster-only method AddMetadataToPod with AddMetadataToChildResource to support RayJob and future CRDs. This simplifies scheduler integration and future extensibility.
kuberay/ray-operator/controllers/ray/batchscheduler/interface/interface.go
Lines 16 to 34 in 0106303
| // BatchScheduler manages submitting RayCluster pods to a third-party scheduler. | |
| type BatchScheduler interface { | |
| // Name corresponds to the schedulerName in Kubernetes: | |
| // https://kubernetes.io/docs/tasks/extend-kubernetes/configure-multiple-schedulers/ | |
| Name() string | |
| // DoBatchSchedulingOnSubmission handles submitting the RayCluster/RayJob to the batch scheduler on creation / update | |
| // For most batch schedulers, this results in the creation of a PodGroup. | |
| DoBatchSchedulingOnSubmission(ctx context.Context, object metav1.Object) error | |
| // AddMetadataToPod enriches the pod with metadata necessary to tie it to the scheduler. | |
| // For example, setting labels for queues / priority, and setting schedulerName. | |
| // This function will be removed once Rayjob Volcano scheduler integration is completed. | |
| AddMetadataToPod(ctx context.Context, rayCluster *rayv1.RayCluster, groupName string, pod *corev1.Pod) | |
| // AddMetadataToChildResource enriches the child resource (batchv1.Job, rayv1.RayCluster) with metadata necessary to tie it to the scheduler. | |
| // For example, setting labels for queues / priority, and setting schedulerName. | |
| AddMetadataToChildResource(ctx context.Context, parent metav1.Object, child metav1.Object, groupName string) | |
| } |
Use case
No response
Related issues
No response
Are you willing to submit a PR?
- Yes I am willing to submit a PR!