// NewDbBackupPV Create a new PV object for Database Backup
NewDbBackupPV Create a new PV object for Database Backup
// NewDbBackupPV Create a new PV object for Database Backup
func NewDbBackupPV(bkp *v1alpha1.Backup, v *v1alpha1.MariaDB, scheme *runtime.Scheme) *corev1.PersistentVolume {
	volLog.Info("Creating new PV for Database Backup")
	labels := utils.MariaDBBkpLabels(bkp, "mariadb-backup")
	pv := &corev1.PersistentVolume{
		ObjectMeta: metav1.ObjectMeta{
			Name: GetMariadbBkpVolumeName(bkp),
			Labels: labels,
		},
		Spec: corev1.PersistentVolumeSpec{
			StorageClassName: "manual",
			Capacity: corev1.ResourceList{
				corev1.ResourceName(corev1.ResourceStorage): resource.MustParse(bkp.Spec.BackupSize),
			},
			AccessModes: []v1.PersistentVolumeAccessMode{v1.ReadWriteMany},
			PersistentVolumeSource: corev1.PersistentVolumeSource{
				HostPath: &corev1.HostPathVolumeSource{
					Path: bkp.Spec.BackupPath},
			},
		},
	}
	volLog.Info("PV created for Database Backup ")
	controllerutil.SetControllerReference(bkp, pv, scheme)
	return pv
}
func NewDbBackupPV ( bkp * v1alpha1 . Backup , v * v1alpha1 . MariaDB , scheme * runtime . Scheme ) * corev1 . PersistentVolume { volLog . Info ( " " ) labels := utils . MariaDBBkpLabels ( bkp , " " ) pv := & corev1 . PersistentVolume { ObjectMeta : metav1 . ObjectMeta { Name : GetMariadbBkpVolumeName ( bkp ) , Labels : labels , } , Spec : corev1 . PersistentVolumeSpec { StorageClassName : " " , Capacity : corev1 . ResourceList { corev1 . ResourceName ( corev1 . ResourceStorage ) : resource . MustParse ( bkp . Spec . BackupSize ) , } , AccessModes : [ ] v1 . PersistentVolumeAccessMode { v1 . ReadWriteMany } , PersistentVolumeSource : corev1 . PersistentVolumeSource { HostPath : & corev1 . HostPathVolumeSource { Path : bkp . Spec . BackupPath } , } , } , } volLog . Info ( " " ) controllerutil . SetControllerReference ( bkp , pv , scheme ) return pv }
NewDbBackupPV Create a new PV object for Database Backup
NewDbBackupPV Create a new PV object for Database Backup
// Namespace: v.Namespace,