k8ssandra / k8ssandra-operator

The Kubernetes operator for K8ssandra
https://k8ssandra.io/
Apache License 2.0
176 stars 79 forks source link

Allow performing restores without having a running cluster #487

Open adejanovski opened 2 years ago

adejanovski commented 2 years ago

Cassandra data should be restore-able on the initial cluster startup. The K8ssandraCluster object would need to be augmented with settings that indicate which backup should be restored on the first start:

    datacenters:
      - metadata:
          name: dc1
        k8sContext: dev
        size: 3
        restoreFrom:
          backupName: medusa_20220315

Connection settings would still be set up in the Medusa section of the manifest, as Medusa's containers will rely on it. The prefix will not be customizable for the restore operation in this first version due to the amount of necessary changes. This would be implemented in a follow up set of issues.

This work will also leverage what will be done in #486.

Here's the sequence of events that should happen:

The initial restore should happen only once, all subsequent restores happening through a classic MedusaRestoreJob. The reconcile should check if the k8c has the CassandraInitialized condition set to true and skip the restore if it's the case.

┆Issue is synchronized with this Jira Story by Unito ┆Issue Number: K8OP-149

bradfordcp commented 2 years ago

Hey team! Please add your planning poker estimate with ZenHub @adejanovski @adutra

adejanovski commented 2 years ago

@jsanda @burmanm, we may want to have a quick design session before moving on with this. I feel like we're not totally on the same page on how this should be implemented.

jsanda commented 2 years ago

Agreed about the design session. Let's make sure we are all on the same page and get it documented.