code: func AddObjectMetaFieldsSet(source fields.Set, objectMeta *metav1.ObjectMeta, hasNamespaceField bool) fields.Set {
  	source["metadata.name"] = objectMeta.Name
  	if hasNamespaceField {
  		source["metadata.namespace"] = objectMeta.Namespace
  	}
  	return source
  }
docs: // AdObjectMetaField add fields that represent the ObjectMeta to source.