code: func SetCRDCondition(crd *CustomResourceDefinition, newCondition CustomResourceDefinitionCondition) {
  	existingCondition := FindCRDCondition(crd, newCondition.Type)
  	if existingCondition == nil {
  		newCondition.LastTransitionTime = metav1.NewTime(time.Now())
  		crd.Status.Conditions = append(crd.Status.Conditions, newCondition)
  		return
  	}
  
  	if existingCondition.Status != newCondition.Status {
  		existingCondition.Status = newCondition.Status
  		existingCondition.LastTransitionTime = newCondition.LastTransitionTime
  	}
  
  	existingCondition.Reason = newCondition.Reason
  	existingCondition.Message = newCondition.Message
  }
docs: // SetCRDCondition sets the status condition. It either overwrites the existing one or creates a new one.