func newDiscoveryResultInstance(nodeName, namespace, parentObjName, parentObjUID string) *v1alpha1.LocalVolumeDiscoveryResult {
	truncatedNodeName := truncateNodeName(resultCRName, nodeName)
	labels := map[string]string{}
	labels[resultCRLabel] = nodeName
	cr := &v1alpha1.LocalVolumeDiscoveryResult{
		ObjectMeta: metav1.ObjectMeta{
			Name:      truncatedNodeName,
			Namespace: namespace,
			Labels:    labels,
			OwnerReferences: []metav1.OwnerReference{
				{
					APIVersion: v1alpha1.SchemeGroupVersion.String(),
					Kind:       "LocalVolumeDiscovery",
					Name:       parentObjName,
					UID:        apiTypes.UID(parentObjUID),
				},
			},
		},
		Spec: v1alpha1.LocalVolumeDiscoveryResultSpec{
			NodeName: nodeName,
		},
	}

	return cr
}
// newDiscoveryResultInstance creates spec for the LocalVolumeDiscoveryResult
newDiscoveryResultInstance creates spec for the LocalVolumeDiscoveryResult
// newDiscoveryResultInstance creates spec for the LocalVolumeDiscoveryResult
func newDiscoveryResultInstance(nodeName, namespace, parentObjName, parentObjUID string) *v1alpha1.LocalVolumeDiscoveryResult {
	truncatedNodeName := truncateNodeName(resultCRName, nodeName)
	labels := map[string]string{}
	labels[resultCRLabel] = nodeName
	cr := &v1alpha1.LocalVolumeDiscoveryResult{
		ObjectMeta: metav1.ObjectMeta{
			Name:      truncatedNodeName,
			Namespace: namespace,
			Labels:    labels,
			OwnerReferences: []metav1.OwnerReference{
				{
					APIVersion: v1alpha1.SchemeGroupVersion.String(),
					Kind:       "LocalVolumeDiscovery",
					Name:       parentObjName,
					UID:        apiTypes.UID(parentObjUID),
				},
			},
		},
		Spec: v1alpha1.LocalVolumeDiscoveryResultSpec{
			NodeName: nodeName,
		},
	}
	return cr
}
func newDiscoveryResultInstance ( nodeName , namespace , parentObjName , parentObjUID string ) * v1alpha1 . LocalVolumeDiscoveryResult { truncatedNodeName := truncateNodeName ( resultCRName , nodeName ) labels := map [ string ] string { } labels [ resultCRLabel ] = nodeName cr := & v1alpha1 . LocalVolumeDiscoveryResult { ObjectMeta : metav1 . ObjectMeta { Name : truncatedNodeName , Namespace : namespace , Labels : labels , OwnerReferences : [ ] metav1 . OwnerReference { { APIVersion : v1alpha1 . SchemeGroupVersion . String ( ) , Kind : " " , Name : parentObjName , UID : apiTypes . UID ( parentObjUID ) , } , } , } , Spec : v1alpha1 . LocalVolumeDiscoveryResultSpec { NodeName : nodeName , } , } return cr }
newDiscoveryResultInstance creates spec for the LocalVolumeDiscoveryResult
newDiscoveryResultInstance creates spec for the LocalVolumeDiscoveryResult