code: func getDeploymentPatch(podTemplate *corev1.PodTemplateSpec, annotations map[string]string) (types.PatchType, []byte, error) {
  	// Create a patch of the Deployment that replaces spec.template
  	patch, err := json.Marshal([]interface{}{
  		map[string]interface{}{
  			"op":    "replace",
  			"path":  "/spec/template",
  			"value": podTemplate,
  		},
  		map[string]interface{}{
  			"op":    "replace",
  			"path":  "/metadata/annotations",
  			"value": annotations,
  		},
  	})
  	return types.JSONPatchType, patch, err
  }
docs: // getPatch returns a patch that can be applied to restore a Deployment to a
  // previous version. If the returned error is nil the patch is valid.