Skip to content
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

Enable binding new PVC to specific PV #3314

Merged
merged 1 commit into from
Apr 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion sdk/python/kfp/dsl/_volume_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def __init__(self,
modes: List[str] = None,
annotations: Dict[str, str] = None,
data_source=None,
volume_name=None,
**kwargs):
"""Create a new instance of VolumeOp.

Expand All @@ -58,6 +59,8 @@ def __init__(self,
used in the data_source field of the PVC as is. Can also be a
string/PipelineParam, and in that case it will be used as a
VolumeSnapshot name (Alpha feature)
volume_name: VolumeName is the binding reference to the PersistentVolume
backing this claim.
kwargs: See ResourceOp definition
Raises:
ValueError: if k8s_resource is provided along with other arguments
Expand Down Expand Up @@ -115,7 +118,8 @@ def __init__(self,
access_modes=modes or VOLUME_MODE_RWM,
resources=requested_resources,
storage_class_name=storage_class,
data_source=data_source
data_source=data_source,
volume_name=volume_name
)
k8s_resource = V1PersistentVolumeClaim(
api_version="v1",
Expand Down