code: func applyPatchToObject(
  	defaulter runtime.ObjectDefaulter,
  	originalMap map[string]interface{},
  	patchMap map[string]interface{},
  	objToUpdate runtime.Object,
  	schemaReferenceObj runtime.Object,
  ) error {
  	patchedObjMap, err := strategicpatch.StrategicMergeMapPatch(originalMap, patchMap, schemaReferenceObj)
  	if err != nil {
  		return interpretStrategicMergePatchError(err)
  	}
  
  	// Rather than serialize the patched map to JSON, then decode it to an object, we go directly from a map to an object
  	if err := runtime.DefaultUnstructuredConverter.FromUnstructured(patchedObjMap, objToUpdate); err != nil {
  		return err
  	}
  	// Decoding from JSON to a versioned object would apply defaults, so we do the same here
  	defaulter.Default(objToUpdate)
  
  	return nil
  }
docs: // applyPatchToObject applies a strategic merge patch of <patchMap> to
  // <originalMap> and stores the result in <objToUpdate>.
  // NOTE: <objToUpdate> must be a versioned object.