-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(kubernetes_platform): add data_source parameter to CreatePVC. Fixes #11420 #12696
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
base: master
Are you sure you want to change the base?
feat(kubernetes_platform): add data_source parameter to CreatePVC. Fixes #11420 #12696
Conversation
Signed-off-by: khushiiagrawal <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @khushiiagrawal. Thanks for your PR. I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for the dataSource field when creating PersistentVolumeClaims (PVCs) through the KFP Python SDK, enabling workflows to restore from VolumeSnapshots or clone existing PVCs without custom components.
Changes:
- Added
data_sourceparameter to theCreatePVCcomponent in the Python SDK - Extended the protobuf schema with
TypedLocalObjectReferencemessage anddata_sourcefield - Implemented
buildPVCDataSourcehelper in the Go backend to process and apply the data source during PVC creation
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| kubernetes_platform/python/kfp/kubernetes/volume.py | Added data_source parameter with documentation to CreatePVC function |
| kubernetes_platform/proto/kubernetes_executor_config.proto | Added TypedLocalObjectReference message and data_source field to CreatePvc message |
| kubernetes_platform/go/kubernetesplatform/kubernetes_executor_config.pb.go | Generated Go protobuf code for new TypedLocalObjectReference and updated CreatePvc |
| kubernetes_platform/python/kfp/kubernetes/kubernetes_executor_config_pb2.py | Generated Python protobuf code for new schema additions |
| backend/src/v2/driver/k8s.go | Implemented buildPVCDataSource helper and integrated data_source into PVC creation |
| kubernetes_platform/python/test/snapshot/data/*.yaml | Updated snapshot tests to include data_source parameter definition |
| kubernetes_platform/python/test/snapshot/data/create_mount_delete_dynamic_pvc.py | Added test example using data_source with VolumeSnapshot |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/ok-to-test |
|
/retest |
|
🎉 Welcome to the Kubeflow Pipelines repo! 🎉 Thanks for opening your first PR! We're excited to have you onboard 🚀 Next steps:
Feel free to ask questions in the comments. |
|
/ok-to-test |
|
@hbelmiro a gentle ping. |
|
/ok-to-test |
|
@khushiiagrawal we have issues with |
|
/ok-to-test |
|
@khushiiagrawal can you please rebase? |
|
@hbelmiro I have rebased. Thank you so much. |
Signed-off-by: khushiiagrawal <[email protected]>
|
/ok-to-test |
|
@hbelmiro @droctothorpe all the CIs are passed , but the CI check is failing for some reason i don't know why |
|
/ok-to-test |
Description of changes:
This PR adds support for the
dataSourcefield when creating PVCs via the KFP Python SDK.Fixes #11420
Why:
The
dataSourcefield is part of the Kubernetes PVC spec and is essential for workflows that need pre-initialized volumes, such as:Currently, users have to create custom components to achieve this. This change brings native support to
kubernetes.CreatePVC().What changed:
Proto schema (
kubernetes_platform/proto/kubernetes_executor_config.proto)TypedLocalObjectReferencemessage to represent the Kubernetes typedata_sourcefield toCreatePvcmessagePython SDK (
kubernetes_platform/python/kfp/kubernetes/volume.py)data_sourceparameter toCreatePVCcomponentBackend driver (
backend/src/v2/driver/k8s.go)buildPVCDataSourcehelper function to convert input to KubernetesTypedLocalObjectReferencecreatePVCto setDataSourceon the PVC specRegenerated protobuf files
kubernetes_executor_config.pb.go(Go)kubernetes_executor_config_pb2.py(Python)Updated snapshot tests to include
data_sourceparameter definitionExample usage:
Checklist: