func (b *Builder) WithNFS(server, path string, readOnly bool) *Builder {
	if len(server) == 0 {
		b.errs = append(b.errs, errors.New("failed to build PV object: missing NFS Server address"))
		return b
	}
	if len(path) == 0 {
		b.errs = append(b.errs, errors.New("failed to build PV object: missing NFS Path"))
		return b
	}
	volumeSource := corev1.PersistentVolumeSource{
		NFS: &corev1.NFSVolumeSource{
			Server:   server,
			Path:     path,
			ReadOnly: readOnly,
		},
	}

	b.pv.object.Spec.PersistentVolumeSource = volumeSource
	return b
}
// WithNFS sets the NFS volume source settings
WithNFS sets the NFS volume source settings
// WithNFS sets the NFS volume source settings
func (b *Builder) WithNFS(server, path string, readOnly bool) *Builder {
	if len(server) == 0 {
		b.errs = append(b.errs, errors.New("failed to build PV object: missing NFS Server address"))
		return b
	}
	if len(path) == 0 {
		b.errs = append(b.errs, errors.New("failed to build PV object: missing NFS Path"))
		return b
	}
	volumeSource := corev1.PersistentVolumeSource{
		NFS: &corev1.NFSVolumeSource{
			Server:   server,
			Path:     path,
			ReadOnly: readOnly,
		},
	}
	b.pv.object.Spec.PersistentVolumeSource = volumeSource
	return b
}
func ( b * Builder ) WithNFS ( server , path string , readOnly bool ) * Builder { if len ( server ) == 0 { b . errs = append ( b . errs , errors . New ( " " ) ) return b } if len ( path ) == 0 { b . errs = append ( b . errs , errors . New ( " " ) ) return b } volumeSource := corev1 . PersistentVolumeSource { NFS : & corev1 . NFSVolumeSource { Server : server , Path : path , ReadOnly : readOnly , } , } b . pv . object . Spec . PersistentVolumeSource = volumeSource return b }
WithNFS sets the NFS volume source settings
WithNFS sets the NFS volume source settings