func (r *PostgreSqlReconciler) UpdateStatus(ctx context.Context, instance *sqlv1alpha1.PostgreSql, phase sqlv1alpha1.ObjectPhase) error {
	instance.Status.Phase = phase
	err := r.Status().Update(ctx, instance)
	if err != nil {
		errMsg := fmt.Sprintf("failed to update PostgreSql instance status  %v/%v", instance.Name, instance.Namespace)
		r.Log.Error(err, errMsg)
		return err
	}
	return nil
}
//UpdateStatus Update the CR status
UpdateStatus Update the CR status
// UpdateStatus Update the CR status
func (r *PostgreSqlReconciler) UpdateStatus(ctx context.Context, instance *sqlv1alpha1.PostgreSql, phase sqlv1alpha1.ObjectPhase) error {
	instance.Status.Phase = phase
	err := r.Status().Update(ctx, instance)
	if err != nil {
		errMsg := fmt.Sprintf("failed to update PostgreSql instance status  %v/%v", instance.Name, instance.Namespace)
		r.Log.Error(err, errMsg)
		return err
	}
	return nil
}
func ( r * PostgreSqlReconciler ) UpdateStatus ( ctx context . Context , instance * sqlv1alpha1 . PostgreSql , phase sqlv1alpha1 . ObjectPhase ) error { instance . Status . Phase = phase err := r . Status ( ) . Update ( ctx , instance ) if err != nil { errMsg := fmt . Sprintf ( " " , instance . Name , instance . Namespace ) r . Log . Error ( err , errMsg ) return err } return nil }
UpdateStatus Update the CR status
UpdateStatus Update the CR status