You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/system/db_reconciler.go
+13-11Lines changed: 13 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -32,16 +32,14 @@ const (
32
32
33
33
// ReconcileCNPGCluster reconciles the CNPG cluster
34
34
// There are several cases to handle:
35
-
// 1. Reconciling a fresh install - No CNPG cluster and no previous DB to import from
35
+
// 1. Reconciling a fresh install - No CNPG cluster and no DBRecovery configuration
36
36
// - In this case we need to create a new empty CNPG cluster
37
37
// - Create a new CNPG image catalog
38
38
// - Create a new CNPG cluster
39
39
//
40
-
// 2. Reconciling an upgrade from a version with a standalone DB - No CNPG cluster and DB statefulset exists
41
-
// - In this case we need to create a new CNPG cluster and import the DB from the previous statefulset
42
-
// - Import is done by providing externalCluster details in the CNPG cluster spec (https://cloudnative-pg.io/documentation/1.25/database_import/#the-microservice-type)
43
-
// - After Import is completed, cleanup the old DB resources. For now we only scale down the standalone DB pod to 0 replicas
44
-
// - All other pods (core, endpoints) should be stopped before starting the import
40
+
// 2. Reconciling recovery from a snapshot - CNPG cluster was deleted by the user to initiate a recovery from a snapshot
41
+
// - In this case we need to create a new CNPG cluster and set the bootstrap configuration to recover from the snapshot
42
+
// - All other pods (core, endpoints) should be stopped before starting the recovery
45
43
//
46
44
// 3. Reconciling an existing CNPG cluster with no standalone DB - CNPG cluster exists and DB statefulset does not exist
47
45
// - If the major version is the same, check if the DB image is changed and update the ImageCatalog
0 commit comments