code: func (dc *DeploymentController) isScalingEvent(d *apps.Deployment, rsList []*apps.ReplicaSet) (bool, error) {
  	newRS, oldRSs, err := dc.getAllReplicaSetsAndSyncRevision(d, rsList, false)
  	if err != nil {
  		return false, err
  	}
  	allRSs := append(oldRSs, newRS)
  	for _, rs := range controller.FilterActiveReplicaSets(allRSs) {
  		desired, ok := deploymentutil.GetDesiredReplicasAnnotation(rs)
  		if !ok {
  			continue
  		}
  		if desired != *(d.Spec.Replicas) {
  			return true, nil
  		}
  	}
  	return false, nil
  }
docs: // isScalingEvent checks whether the provided deployment has been updated with a scaling event
  // by looking at the desired-replicas annotation in the active replica sets of the deployment.
  //
  // rsList should come from getReplicaSetsForDeployment(d).
  // podMap should come from getPodMapForDeployment(d, rsList).