func (controller *PersistentVolumeProvisionerController) newProvisioner(plugin volume.ProvisionableVolumePlugin, claim *api.PersistentVolumeClaim, pv *api.PersistentVolume) (volume.Provisioner, error) {
	tags := make(map[string]string)
	tags[cloudVolumeCreatedForClaimNamespaceTag] = claim.Namespace
	tags[cloudVolumeCreatedForClaimNameTag] = claim.Name

	// pv can be nil when the provisioner has not created the PV yet
	if pv != nil {
		tags[cloudVolumeCreatedForVolumeNameTag] = pv.Name
	}

	volumeOptions := volume.VolumeOptions{
		Capacity:                      claim.Spec.Resources.Requests[api.ResourceName(api.ResourceStorage)],
		AccessModes:                   claim.Spec.AccessModes,
		PersistentVolumeReclaimPolicy: api.PersistentVolumeReclaimDelete,
		CloudTags:                     &tags,
		ClusterName:                   controller.clusterName,
	}

	if pv != nil {
		volumeOptions.PVName = pv.Name
	}

	provisioner, err := plugin.NewProvisioner(volumeOptions)
	return provisioner, err
}
func newProvisioner(plugin volume.ProvisionableVolumePlugin, claim *api.PersistentVolumeClaim) (volume.Provisioner, error) {
	volumeOptions := volume.VolumeOptions{
		Capacity:                      claim.Spec.Resources.Requests[api.ResourceName(api.ResourceStorage)],
		AccessModes:                   claim.Spec.AccessModes,
		PersistentVolumeReclaimPolicy: api.PersistentVolumeReclaimDelete,
	}

	provisioner, err := plugin.NewProvisioner(volumeOptions)
	return provisioner, err
}
func newProvisioner(plugin volume.ProvisionableVolumePlugin, claim *api.PersistentVolumeClaim) (volume.Provisioner, error) {
	volumeOptions := volume.VolumeOptions{
		Capacity:                      claim.Spec.Resources.Requests[api.ResourceName(api.ResourceStorage)],
		AccessModes:                   claim.Spec.AccessModes,
		PersistentVolumeReclaimPolicy: api.PersistentVolumeReclaimDelete,
		CloudTags: &map[string]string{
			cloudVolumeCreatedForNamespaceTag: claim.Namespace,
			cloudVolumeCreatedForNameTag:      claim.Name,
		},
	}

	provisioner, err := plugin.NewProvisioner(volumeOptions)
	return provisioner, err
}