func upgradeTo10(cr *apiv1alpha1.Astarte, c client.Client, scheme *runtime.Scheme, recorder record.EventRecorder) error {
	reqLogger := log.WithValues("Request.Namespace", cr.Namespace, "Request.Name", cr.Name)
	reqLogger.Info("Upgrading Astarte to the 1.0.x series. The cluster might become partially unresponsive during the process")
	reqLogger.Info("At some point, the broker will be brought down during reconciliation. Devices won't be able to connect for a short period of time.")
	recorder.Event(cr, "Normal", commontypes.AstarteResourceEventUpgrade.String(),
		"Starting Database Migration")
	reqLogger.Info("Upgrading Housekeeping and migrating the Database...")
	if _, err := upgradeHousekeeping(landing10Version, false, cr, c, scheme, recorder); err != nil {
		return err
	}
	if err := waitForHousekeepingUpgrade(cr, c, recorder); err != nil {
		recorder.Event(cr, "Warning", commontypes.AstarteResourceEventCriticalError.String(),
			"Timed out waiting for Database Migration. Upgrade will be retried, but manual intervention is likely required")
		return fmt.Errorf("Failed in waiting for Housekeeping deployment and migrations to go up: %v", err)
	}
	recorder.Event(cr, "Normal", commontypes.AstarteResourceEventUpgrade.String(),
		"Database migrated successfully")
	reqLogger.Info("Database successfully migrated!")
	if err := shutdownVerneMQ(cr, c, recorder); err != nil {
		return err
	}
	if err := drainRabbitMQQueues(cr, c, recorder); err != nil {
		return err
	}
	if err := tearDownCFSSLStatefulSet(cr, c, recorder); err != nil {
		return err
	}
	reqLogger.Info("Your Astarte cluster has been successfully upgraded to the 1.0.x series!")
	cr.Status.AstarteVersion = landing10Version
	if err := c.Status().Update(context.TODO(), cr); err != nil {
		reqLogger.Error(err, "Failed to update Astarte status. The Operator might misbehave")
		return err
	}
	recorder.Event(cr, "Normal", commontypes.AstarteResourceEventUpgrade.String(),
		"Astarte upgraded successfully to the 1.0.x series")
	return nil
}
blindly upgrades to 1.0. Invokable only by the upgrade logic
package upgrade
import (
	"context"
	"fmt"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/client-go/tools/record"
	"sigs.k8s.io/controller-runtime/pkg/client"
	commontypes "github.com/astarte-platform/astarte-kubernetes-operator/apis/api/commontypes"
	apiv1alpha1 "github.com/astarte-platform/astarte-kubernetes-operator/apis/api/v1alpha1"
)
const landing10Version string = "1.0.0"