code: func updatePodWithRetries(podClient corev1client.PodsGetter, namespace string, pod *corev1.Pod, applyUpdate updatePodFunc) (*corev1.Pod, error) {
  	// Deep copy the pod in case we failed on Get during retry loop
  	oldPod := pod.DeepCopy()
  	err := retry.RetryOnConflict(retry.DefaultBackoff, func() (e error) {
  		// Apply the update, then attempt to push it to the apiserver.
  		applyUpdate(pod)
  		if pod, e = podClient.Pods(namespace).Update(pod); e == nil {
  			return
  		}
  		updateErr := e
  		if pod, e = podClient.Pods(namespace).Get(oldPod.Name, metav1.GetOptions{}); e != nil {
  			pod = oldPod
  		}
  		// Only return the error from update
  		return updateErr
  	})
  	// If the error is non-nil the returned pod cannot be trusted, if it is nil, the returned
  	// controller contains the applied update.
  	return pod, err
  }
docs: // updatePodWithRetries retries updating the given pod on conflict with the following steps:
  // 1. Get latest resource
  // 2. applyUpdate
  // 3. Update the resource