loadCluster loads the cluster definition from the API server
(ctx context.Context, typedClient client.Client)
| 467 | |
| 468 | // loadCluster loads the cluster definition from the API server |
| 469 | func (info InitInfo) loadCluster(ctx context.Context, typedClient client.Client) (*apiv1.Cluster, error) { |
| 470 | var cluster apiv1.Cluster |
| 471 | err := typedClient.Get(ctx, client.ObjectKey{Namespace: info.Namespace, Name: info.ClusterName}, &cluster) |
| 472 | if err != nil { |
| 473 | return nil, err |
| 474 | } |
| 475 | |
| 476 | return &cluster, nil |
| 477 | } |
| 478 | |
| 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 |
no test coverage detected