Enable PVC as DataSource for PVC creation

This enables the ability to specify and existing PVC as a DataSource in
a new PVC Spec (eg "clone" and existing volume).
This commit is contained in:
j-griffith
2019-04-11 13:45:03 -06:00
parent 8b7e777fe8
commit 123f1bac35
4 changed files with 70 additions and 7 deletions

View File

@@ -1537,6 +1537,7 @@ var supportedVolumeModes = sets.NewString(string(core.PersistentVolumeBlock), st
var supportedDataSourceAPIGroupKinds = map[schema.GroupKind]bool{
{Group: "snapshot.storage.k8s.io", Kind: "VolumeSnapshot"}: true,
{Group: "", Kind: "PersistentVolumeClaim"}: true,
}
func ValidatePersistentVolume(pv *core.PersistentVolume) field.ErrorList {