code: func (ec *EstablishingController) sync(key string) error {
  	cachedCRD, err := ec.crdLister.Get(key)
  	if apierrors.IsNotFound(err) {
  		return nil
  	}
  	if err != nil {
  		return err
  	}
  
  	if !apiextensions.IsCRDConditionTrue(cachedCRD, apiextensions.NamesAccepted) ||
  		apiextensions.IsCRDConditionTrue(cachedCRD, apiextensions.Established) {
  		return nil
  	}
  
  	crd := cachedCRD.DeepCopy()
  	establishedCondition := apiextensions.CustomResourceDefinitionCondition{
  		Type:    apiextensions.Established,
  		Status:  apiextensions.ConditionTrue,
  		Reason:  "InitialNamesAccepted",
  		Message: "the initial names have been accepted",
  	}
  	apiextensions.SetCRDCondition(crd, establishedCondition)
  
  	// Update server with new CRD condition.
  	_, err = ec.crdClient.CustomResourceDefinitions().UpdateStatus(crd)
  	if apierrors.IsNotFound(err) || apierrors.IsConflict(err) {
  		// deleted or changed in the meantime, we'll get called again
  		return nil
  	}
  	if err != nil {
  		return err
  	}
  
  	return nil
  }
docs: // sync is used to turn CRDs into the Established state.