Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Cleaned enable pvc datasource #76913
This enables the ability to specify and existing PVC as a DataSource in
What type of PR is this?
What this PR does / why we need it:
Currently the only valid input Kind for PVC DataSource is "VolumeSnapshot", this feature adds the ability to also specify a DataSource Kind of "PersistentVolumeClaim".
This results in the ability for a user to specify intent to clone and existing PVC, it does NOT implement cloning functionality in Kubernetes; that's left to the external csi provisioner and plugins. It does however provide a mechanism to request a clone operation to the csi-provisioner and ultimately the csi plugin that the original PVC is allocated from.
Currently (as of 1.14) a user is able to enter a DataSource with any information they wish, however if it's not of the type "VolumeSnapshot" and the "VolumeSnapshotDataSource" feature gate is not enabled, the input is nilled and silently ignored. This change follows the same pattern, via the "VolumeDataSource" feature gate.
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Apr 22, 2019
thockin left a comment
What bad things happen if we let users put whatever they want in this field and have the provisioners be responsible for checking the flag gate and eventing "not supported" ?
@thockin Not much really, either it does "nothing" because there isn't another controller looking for it or acting upon it, or said entry is valid and it's acted upon (or rejected) by the interested controller.
I'm fine with this for alpha, but it seems like the final state is that the provisioner is responsible for evaluating this and deciding whether it supports the source or not (and in fact, already not all provisioners will support all sources or even support any source at all, right)?
[APPROVALNOTIFIER] This PR is APPROVED
The full list of commands accepted by this bot can be found here.
The pull request process is described here
The idea was to start off strict and loosen over time: only allow specific datasources initially, and loosen over time to eventually allow arbitrary datasources. In order to support aribitrary datasources we want to formalize the idea of "populators" independent of "provisioners". We haven't gotten that far yet, so for now we're just slightly loosening, instead of allowing anything.