loadBackup loads the backup manifest from the API server of from the object store. It also gets the environment variables that are needed to recover the cluster
( ctx context.Context, typedClient client.Client, cluster *apiv1.Cluster, )
| 479 | // loadBackup loads the backup manifest from the API server of from the object store. |
| 480 | // It also gets the environment variables that are needed to recover the cluster |
| 481 | func (info InitInfo) loadBackup( |
| 482 | ctx context.Context, |
| 483 | typedClient client.Client, |
| 484 | cluster *apiv1.Cluster, |
| 485 | ) (*apiv1.Backup, []string, error) { |
| 486 | // Recovery given an existing backup |
| 487 | if cluster.Spec.Bootstrap.Recovery.Backup != nil { |
| 488 | return info.loadBackupFromReference(ctx, typedClient, cluster) |
| 489 | } |
| 490 | |
| 491 | return info.loadBackupObjectFromExternalCluster(ctx, typedClient, cluster) |
| 492 | } |
| 493 | |
| 494 | // loadBackupObjectFromExternalCluster generates an in-memory Backup structure given a reference to |
| 495 | // an external cluster, loading the required information from the object store |
no test coverage detected