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

External provisioner misses VolumeSource support for CLONE_VOLUMES #172

Closed
humblec opened this issue Nov 28, 2018 · 5 comments
Closed

External provisioner misses VolumeSource support for CLONE_VOLUMES #172

humblec opened this issue Nov 28, 2018 · 5 comments
Assignees

Comments

@humblec
Copy link
Contributor

humblec commented Nov 28, 2018

CSI 1.0.0 has VolumeSource struct in VolumeContentSource for supporting cloning volumes (container-storage-interface/spec@7a8d2d5) , but the required changes are not there in the external-provisioner .

This is the template we used for testing, am i missing anything here?

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: glusterfs-pv-restore
spec:
storageClassName: glusterfs-csi
dataSource:
name: gcs-example-volume
kind: VolumeSource
apiGroup: snapshot.storage.k8s.io
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi

The error we receive.

[root@master ~]# kubectl create -f vol-csi.yaml 
The PersistentVolumeClaim "glusterfs-pv-restore" is invalid: spec.dataSource: Unsupported value: "VolumeContentSource.snapshot.storage.k8s.io": supported values: "VolumeSnapshot.snapshot.storage.k8s.io" [root@master ~]# vi vol-csi.yaml [root@master ~]# kubectl create -f vol-csi.yaml The PersistentVolumeClaim "glusterfs-pv-restore" is invalid: spec.dataSource: Unsupported value: "VolumeSource.snapshot.storage.k8s.io": supported values: "VolumeSnapshot.snapshot.storage.k8s.io">
@humblec
Copy link
Contributor Author

humblec commented Nov 28, 2018

/assign @jsafrane

@humblec
Copy link
Contributor Author

humblec commented Nov 28, 2018

kubernetes used for testing

[root@master ~]# kubectl version Client Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.0-beta.2", GitCommit:"a4ff09c41589c48547e04f85391aa5610ebe0e17", GitTreeState:"clean", BuildDate:"2018-11-23T00:55:34Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.0-beta.2", GitCommit:"a4ff09c41589c48547e04f85391aa5610ebe0e17", GitTreeState:"clean", BuildDate:"2018-11-23T00:47:47Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}

@humblec humblec changed the title External provisioner misses VolumeSource support for ClONE_VOLUMES External provisioner misses VolumeSource support for CLONE_VOLUMES Nov 28, 2018
j-griffith pushed a commit to j-griffith/external-provisioner that referenced this issue Jan 29, 2019
This PR extends the supported DataSources handled by the
external-provisioner to include PVCs (Clone) and Populators (external
CRDs).

It removes the restriction of of the provisioner erroring when a
DataSource.Kind of anything other than VolumeSnapshot is supplied (the
Kubernetes API currently enforces this anyway via it's verifictaion
checks) and adds handling for a DataSource.Kind of
PersistentVolumeClaim.

In addition for things like external populators, we provide a default
case that just logs that the proviserion doesn't take any action on the
received type, but if the type is supported/allowed via the Kubernetes
API then the DataSource information is stll in the spec for external
controllers to act upon. This allows external controllers to work (again
requires Kubernetes API support), and can be formalized/added easily
when an official populator controller is merged.

Addresses: Issue kubernetes-csi#172
j-griffith pushed a commit to j-griffith/external-provisioner that referenced this issue Jan 29, 2019
This PR extends the supported DataSources handled by the
external-provisioner to include PVCs (Clone) and Populators (external
CRDs).

It removes the restriction of of the provisioner erroring when a
DataSource.Kind of anything other than VolumeSnapshot is supplied (the
Kubernetes API currently enforces this anyway via it's verifictaion
checks) and adds handling for a DataSource.Kind of
PersistentVolumeClaim.

In addition for things like external populators, we provide a default
case that just logs that the proviserion doesn't take any action on the
received type, but if the type is supported/allowed via the Kubernetes
API then the DataSource information is stll in the spec for external
controllers to act upon. This allows external controllers to work (again
requires Kubernetes API support), and can be formalized/added easily
when an official populator controller is merged.

Addresses: Issue kubernetes-csi#172
j-griffith pushed a commit to j-griffith/external-provisioner that referenced this issue Feb 8, 2019
This PR extends the supported DataSources handled by the
external-provisioner to include PVCs (Clone) and external API Object
types.

It removes the restriction of of the provisioner erroring when a
DataSource.Kind of anything other than VolumeSnapshot is supplied
and adds handling for a DataSource.Kind of PersistentVolumeClaim.

In the case of specified DataSources that the provisioner doesn't deal
with, we just log that the provisioner doesn't take any action on the
specified type, and continue with provisioning ignoring the DataSource
field.

This not only enables Clone requests, but it also allows development of
external controllers to initialize newly created volumes.  Additional
improvements/enhancements will be added via PV/PVC taints and
tolerations when they're implemented.

Addresses: Issue kubernetes-csi#172
j-griffith pushed a commit to j-griffith/external-provisioner that referenced this issue Feb 14, 2019
This PR extends the supported DataSources handled by the
external-provisioner to include PVCs (Clone) and external API Object
types.

It removes the restriction of of the provisioner erroring when a
DataSource.Kind of anything other than VolumeSnapshot is supplied
and adds handling for a DataSource.Kind of PersistentVolumeClaim.

In the case of specified DataSources that the provisioner doesn't deal
with, we just log that the provisioner doesn't take any action on the
specified type, and continue with provisioning ignoring the DataSource
field.

This not only enables Clone requests, but it also allows development of
external controllers to initialize newly created volumes.  Additional
improvements/enhancements will be added via PV/PVC taints and
tolerations when they're implemented.

Addresses: Issue kubernetes-csi#172
j-griffith pushed a commit to j-griffith/external-provisioner that referenced this issue Feb 15, 2019
This PR extends the supported DataSources handled by the
external-provisioner to include PVCs (Clone) and external API Object
types.

It removes the restriction of of the provisioner erroring when a
DataSource.Kind of anything other than VolumeSnapshot is supplied
and adds handling for a DataSource.Kind of PersistentVolumeClaim.

In the case of specified DataSources that the provisioner doesn't deal
with, we just log that the provisioner doesn't take any action on the
specified type, and continue with provisioning ignoring the DataSource
field.

This not only enables Clone requests, but it also allows development of
external controllers to initialize newly created volumes.  Additional
improvements/enhancements will be added via PV/PVC taints and
tolerations when they're implemented.

Addresses: Issue kubernetes-csi#172
j-griffith pushed a commit to j-griffith/external-provisioner that referenced this issue Feb 19, 2019
This PR extends the supported DataSources handled by the
external-provisioner to include PVCs (Clone) and external API Object
types.

It removes the restriction of of the provisioner erroring when a
DataSource.Kind of anything other than VolumeSnapshot is supplied
and adds handling for a DataSource.Kind of PersistentVolumeClaim.

In the case of specified DataSources that the provisioner doesn't deal
with, we just log that the provisioner doesn't take any action on the
specified type, and continue with provisioning ignoring the DataSource
field.

This not only enables Clone requests, but it also allows development of
external controllers to initialize newly created volumes.  Additional
improvements/enhancements will be added via PV/PVC taints and
tolerations when they're implemented.

Addresses: Issue kubernetes-csi#172
j-griffith pushed a commit to j-griffith/external-provisioner that referenced this issue Feb 21, 2019
This PR extends the supported DataSources handled by the
external-provisioner to include PVCs (Clone) and external API Object
types.

It removes the restriction of of the provisioner erroring when a
DataSource.Kind of anything other than VolumeSnapshot is supplied
and adds handling for a DataSource.Kind of PersistentVolumeClaim.

In the case of specified DataSources that the provisioner doesn't deal
with, we just log that the provisioner doesn't take any action on the
specified type, and continue with provisioning ignoring the DataSource
field.

This not only enables Clone requests, but it also allows development of
external controllers to initialize newly created volumes.  Additional
improvements/enhancements will be added via PV/PVC taints and
tolerations when they're implemented.

Addresses: Issue kubernetes-csi#172
@saad-ali
Copy link
Member

Volume cloning feature for Kubernetes is currently being targetted for an alpha in 1.15. The KEP has been approved: https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/20181111-extend-datasource-field.md.

j-griffith pushed a commit to j-griffith/external-provisioner that referenced this issue Apr 11, 2019
This PR extends the supported DataSources handled by the
external-provisioner to include PVCs (Clone).

It removes the restriction of of the provisioner erroring when a
DataSource.Kind of anything other than VolumeSnapshot is supplied
and adds handling for a DataSource.Kind of PersistentVolumeClaim.

This implements the ability to specify a clone, and pass that dataSource
on to plugins that report support for the capability.

Addresses: Issue kubernetes-csi#172
j-griffith pushed a commit to j-griffith/external-provisioner that referenced this issue May 30, 2019
This PR extends the supported DataSources handled by the
external-provisioner to include PVCs (Clone).

It removes the restriction of of the provisioner erroring when a
DataSource.Kind of anything other than VolumeSnapshot is supplied
and adds handling for a DataSource.Kind of PersistentVolumeClaim.

This implements the ability to specify a clone, and pass that dataSource
on to plugins that report support for the capability.

Addresses: Issue kubernetes-csi#172
j-griffith pushed a commit to j-griffith/external-provisioner that referenced this issue May 30, 2019
This PR extends the supported DataSources handled by the
external-provisioner to include PVCs (Clone).

It removes the restriction of of the provisioner erroring when a
DataSource.Kind of anything other than VolumeSnapshot is supplied
and adds handling for a DataSource.Kind of PersistentVolumeClaim.

This implements the ability to specify a clone, and pass that dataSource
on to plugins that report support for the capability.

Addresses: Issue kubernetes-csi#172
j-griffith pushed a commit to j-griffith/external-provisioner that referenced this issue May 31, 2019
This PR extends the supported DataSources handled by the
external-provisioner to include PVCs (Clone).

It removes the restriction of of the provisioner erroring when a
DataSource.Kind of anything other than VolumeSnapshot is supplied
and adds handling for a DataSource.Kind of PersistentVolumeClaim.

This implements the ability to specify a clone, and pass that dataSource
on to plugins that report support for the capability.

Addresses: Issue kubernetes-csi#172
j-griffith pushed a commit to j-griffith/external-provisioner that referenced this issue Jun 12, 2019
This PR extends the supported DataSources handled by the
external-provisioner to include PVCs (Clone).

It removes the restriction of of the provisioner erroring when a
DataSource.Kind of anything other than VolumeSnapshot is supplied
and adds handling for a DataSource.Kind of PersistentVolumeClaim.

This implements the ability to specify a clone, and pass that dataSource
on to plugins that report support for the capability.

Addresses: Issue kubernetes-csi#172
@msau42
Copy link
Collaborator

msau42 commented Jun 20, 2019

Implemented by #220
/close

@k8s-ci-robot
Copy link
Contributor

@msau42: Closing this issue.

In response to this:

Implemented by #220
/close

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/test-infra repository.

zhucan pushed a commit to zhucan/external-provisioner that referenced this issue Jul 23, 2019
This PR extends the supported DataSources handled by the
external-provisioner to include PVCs (Clone).

It removes the restriction of of the provisioner erroring when a
DataSource.Kind of anything other than VolumeSnapshot is supplied
and adds handling for a DataSource.Kind of PersistentVolumeClaim.

This implements the ability to specify a clone, and pass that dataSource
on to plugins that report support for the capability.

Addresses: Issue kubernetes-csi#172
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants