// NewDbBackupPVC Create a new PV Claim object for Database Backup
NewDbBackupPVC Create a new PV Claim object for Database Backup
// NewDbBackupPVC Create a new PV Claim object for Database Backup
func NewDbBackupPVC(bkp *v1alpha1.Backup, v *v1alpha1.MariaDB, scheme *runtime.Scheme) *corev1.PersistentVolumeClaim {
	volLog.Info("Creating new PVC for Database Backup")
	labels := utils.MariaDBBkpLabels(bkp, "mariadb-backup")
	storageClassName := "manual"
	pvc := &corev1.PersistentVolumeClaim{
		ObjectMeta: metav1.ObjectMeta{
			Name:      GetMariadbBkpVolumeClaimName(bkp),
			Namespace: v.Namespace,
			Labels:    labels,
		},
		Spec: corev1.PersistentVolumeClaimSpec{
			StorageClassName: &storageClassName,
			AccessModes:      []v1.PersistentVolumeAccessMode{v1.ReadWriteMany},
			Resources: corev1.ResourceRequirements{
				Requests: corev1.ResourceList{
					corev1.ResourceName(corev1.ResourceStorage): resource.MustParse(bkp.Spec.BackupSize),
				},
			},
			VolumeName: GetMariadbBkpVolumeName(bkp),
		},
	}
	volLog.Info("PVC created for Database Backup ")
	controllerutil.SetControllerReference(bkp, pvc, scheme)
	return pvc
}
func NewDbBackupPVC ( bkp * v1alpha1 . Backup , v * v1alpha1 . MariaDB , scheme * runtime . Scheme ) * corev1 . PersistentVolumeClaim { volLog . Info ( " " ) labels := utils . MariaDBBkpLabels ( bkp , " " ) storageClassName := " " pvc := & corev1 . PersistentVolumeClaim { ObjectMeta : metav1 . ObjectMeta { Name : GetMariadbBkpVolumeClaimName ( bkp ) , Namespace : v . Namespace , Labels : labels , } , Spec : corev1 . PersistentVolumeClaimSpec { StorageClassName : & storageClassName , AccessModes : [ ] v1 . PersistentVolumeAccessMode { v1 . ReadWriteMany } , Resources : corev1 . ResourceRequirements { Requests : corev1 . ResourceList { corev1 . ResourceName ( corev1 . ResourceStorage ) : resource . MustParse ( bkp . Spec . BackupSize ) , } , } , VolumeName : GetMariadbBkpVolumeName ( bkp ) , } , } volLog . Info ( " " ) controllerutil . SetControllerReference ( bkp , pvc , scheme ) return pvc }
NewDbBackupPVC Create a new PV Claim object for Database Backup
NewDbBackupPVC Create a new PV Claim object for Database Backup