code: func updateAPIServiceStatus(client apiregistrationclient.APIServicesGetter, originalAPIService, newAPIService *apiregistration.APIService) (*apiregistration.APIService, error) {
  	if equality.Semantic.DeepEqual(originalAPIService.Status, newAPIService.Status) {
  		return newAPIService, nil
  	}
  
  	newAPIService, err := client.APIServices().UpdateStatus(newAPIService)
  	if err != nil {
  		return nil, err
  	}
  
  	// update metrics
  	wasAvailable := apiregistration.IsAPIServiceConditionTrue(originalAPIService, apiregistration.Available)
  	isAvailable := apiregistration.IsAPIServiceConditionTrue(newAPIService, apiregistration.Available)
  	if isAvailable != wasAvailable {
  		if isAvailable {
  			unavailableGauge.WithLabelValues(newAPIService.Name).Set(0.0)
  		} else {
  			unavailableGauge.WithLabelValues(newAPIService.Name).Set(1.0)
  
  			reason := "UnknownReason"
  			if newCondition := apiregistration.GetAPIServiceConditionByType(newAPIService, apiregistration.Available); newCondition != nil {
  				reason = newCondition.Reason
  			}
  			unavailableCounter.WithLabelValues(newAPIService.Name, reason).Inc()
  		}
  	}
  
  	return newAPIService, nil
  }
docs: // updateAPIServiceStatus only issues an update if a change is detected.  We have a tight resync loop to quickly detect dead
  // apiservices.  Doing that means we don't want to quickly issue no-op updates.