code: func (dsc *DaemonSetsController) updateHistory(old, cur interface{}) {
  	curHistory := cur.(*apps.ControllerRevision)
  	oldHistory := old.(*apps.ControllerRevision)
  	if curHistory.ResourceVersion == oldHistory.ResourceVersion {
  		// Periodic resync will send update events for all known ControllerRevisions.
  		return
  	}
  
  	curControllerRef := metav1.GetControllerOf(curHistory)
  	oldControllerRef := metav1.GetControllerOf(oldHistory)
  	controllerRefChanged := !reflect.DeepEqual(curControllerRef, oldControllerRef)
  	if controllerRefChanged && oldControllerRef != nil {
  		// The ControllerRef was changed. Sync the old controller, if any.
  		if ds := dsc.resolveControllerRef(oldHistory.Namespace, oldControllerRef); ds != nil {
  			dsc.enqueueDaemonSet(ds)
  		}
  	}
  
  	// If it has a ControllerRef, that's all that matters.
  	if curControllerRef != nil {
  		ds := dsc.resolveControllerRef(curHistory.Namespace, curControllerRef)
  		if ds == nil {
  			return
  		}
  		klog.V(4).Infof("ControllerRevision %s updated.", curHistory.Name)
  		dsc.enqueueDaemonSet(ds)
  		return
  	}
  
  	// Otherwise, it's an orphan. If anything changed, sync matching controllers
  	// to see if anyone wants to adopt it now.
  	labelChanged := !reflect.DeepEqual(curHistory.Labels, oldHistory.Labels)
  	if labelChanged || controllerRefChanged {
  		daemonSets := dsc.getDaemonSetsForHistory(curHistory)
  		if len(daemonSets) == 0 {
  			return
  		}
  		klog.V(4).Infof("Orphan ControllerRevision %s updated.", curHistory.Name)
  		for _, ds := range daemonSets {
  			dsc.enqueueDaemonSet(ds)
  		}
  	}
  }
docs: // updateHistory figures out what DaemonSet(s) manage a ControllerRevision when the ControllerRevision
  // is updated and wake them up. If anything of the ControllerRevision has changed, we need to  awaken
  // both the old and new DaemonSets.