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