code: func (daemonSetStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList {
  	newDaemonSet := obj.(*apps.DaemonSet)
  	oldDaemonSet := old.(*apps.DaemonSet)
  	allErrs := validation.ValidateDaemonSet(obj.(*apps.DaemonSet))
  	allErrs = append(allErrs, validation.ValidateDaemonSetUpdate(newDaemonSet, oldDaemonSet)...)
  	allErrs = append(allErrs, corevalidation.ValidateConditionalPodTemplate(&newDaemonSet.Spec.Template, &oldDaemonSet.Spec.Template, field.NewPath("spec.template"))...)
  
  	// Update is not allowed to set Spec.Selector for apps/v1 and apps/v1beta2 (allowed for extensions/v1beta1).
  	// If RequestInfo is nil, it is better to revert to old behavior (i.e. allow update to set Spec.Selector)
  	// to prevent unintentionally breaking users who may rely on the old behavior.
  	// TODO(#50791): after extensions/v1beta1 is removed, move selector immutability check inside ValidateDaemonSetUpdate().
  	if requestInfo, found := genericapirequest.RequestInfoFrom(ctx); found {
  		groupVersion := schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion}
  		switch groupVersion {
  		case extensionsv1beta1.SchemeGroupVersion:
  			// no-op for compatibility
  		default:
  			// disallow mutation of selector
  			allErrs = append(allErrs, apivalidation.ValidateImmutableField(newDaemonSet.Spec.Selector, oldDaemonSet.Spec.Selector, field.NewPath("spec").Child("selector"))...)
  		}
  	}
  
  	return allErrs
  }
docs: // ValidateUpdate is the default update validation for an end user.