// NewMariaDbPVC Create a new PV Claim object for MariaDB
NewMariaDbPVC Create a new PV Claim object for MariaDB
// NewMariaDbPVC Create a new PV Claim object for MariaDB
func NewMariaDbPVC(v *v1alpha1.MariaDB, scheme *runtime.Scheme) *corev1.PersistentVolumeClaim {
	volLog.Info("Creating new PVC for MariaDB")
	labels := utils.Labels(v, "mariadb")
	storageClassName := "manual"
	pvc := &corev1.PersistentVolumeClaim{
		ObjectMeta: metav1.ObjectMeta{
			Name:      GetMariadbVolumeClaimName(v),
			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(v.Spec.DataStorageSize),
				},
			},
			VolumeName: GetMariadbVolumeName(v),
		},
	}
	volLog.Info("PVC created for MariaDB ")
	controllerutil.SetControllerReference(v, pvc, scheme)
	return pvc
}
func NewMariaDbPVC ( v * v1alpha1 . MariaDB , scheme * runtime . Scheme ) * corev1 . PersistentVolumeClaim { volLog . Info ( " " ) labels := utils . Labels ( v , " " ) storageClassName := " " pvc := & corev1 . PersistentVolumeClaim { ObjectMeta : metav1 . ObjectMeta { Name : GetMariadbVolumeClaimName ( v ) , 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 ( v . Spec . DataStorageSize ) , } , } , VolumeName : GetMariadbVolumeName ( v ) , } , } volLog . Info ( " " ) controllerutil . SetControllerReference ( v , pvc , scheme ) return pvc }
NewMariaDbPVC Create a new PV Claim object for MariaDB
NewMariaDbPVC Create a new PV Claim object for MariaDB