code: func (daemonSetStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) {
  	newDaemonSet := obj.(*apps.DaemonSet)
  	oldDaemonSet := old.(*apps.DaemonSet)
  
  	pod.DropDisabledTemplateFields(&newDaemonSet.Spec.Template, &oldDaemonSet.Spec.Template)
  
  	// update is not allowed to set status
  	newDaemonSet.Status = oldDaemonSet.Status
  
  	// update is not allowed to set TemplateGeneration
  	newDaemonSet.Spec.TemplateGeneration = oldDaemonSet.Spec.TemplateGeneration
  
  	// Any changes to the spec increment the generation number, any changes to the
  	// status should reflect the generation number of the corresponding object. We push
  	// the burden of managing the status onto the clients because we can't (in general)
  	// know here what version of spec the writer of the status has seen. It may seem like
  	// we can at first -- since obj contains spec -- but in the future we will probably make
  	// status its own object, and even if we don't, writes may be the result of a
  	// read-update-write loop, so the contents of spec may not actually be the spec that
  	// the manager has *seen*.
  	//
  	// TODO: Any changes to a part of the object that represents desired state (labels,
  	// annotations etc) should also increment the generation.
  	if !apiequality.Semantic.DeepEqual(oldDaemonSet.Spec.Template, newDaemonSet.Spec.Template) {
  		newDaemonSet.Spec.TemplateGeneration = oldDaemonSet.Spec.TemplateGeneration + 1
  		newDaemonSet.Generation = oldDaemonSet.Generation + 1
  		return
  	}
  	if !apiequality.Semantic.DeepEqual(oldDaemonSet.Spec, newDaemonSet.Spec) {
  		newDaemonSet.Generation = oldDaemonSet.Generation + 1
  	}
  }
docs: // PrepareForUpdate clears fields that are not allowed to be set by end users on update.