codeflare-sdk
codeflare-sdk copied to clipboard
Add arguments to pass Ray cluster head and worker templates
Issue link
Fixes #413.
What changes have been made
This PR adds parameters to the Ray cluster configuration API, so users can provide Pod template for the head and worker nodes, e.g.:
from kubernetes import V1PodTemplateSpec, V1PodSpec, V1Toleration
cluster = Cluster(ClusterConfiguration(
worker_template=V1PodTemplateSpec(
spec=V1PodSpec(
tolerations=[V1Toleration(
key="nvidia.com/gpu",
operator="Exists",
effect="NoSchedule",
)],
node_selector={
"nvidia.com/gpu.present": "true",
},
)
),
head_template=V1PodTemplateSpec(...),
))
Verification steps
Checks
- [ ] I've made sure the tests are passing.
- Testing Strategy
- [ ] Unit tests
- [ ] Manual tests
- [ ] Testing is not required for this change
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from astefanutti. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
PR needs rebase.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.