Skip to content

Commit e3a4a13

Browse files
Cleans pgBackRest Repo on In-Place Restore
The pgBackRest repository is now cleaned up following an in-place restore and then recreated during cluster initialization. This ensures the proper initialization logic is executed when the pgBackRest repository is scaled up to one during initialization. Specifically, this triggers the deployment and initialization of the Primary Pod for the cluster.
1 parent 7a3a408 commit e3a4a13

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/controller/job/bootstraphandler.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ func (c *Controller) cleanupBootstrapResources(job *apiv1.Job, cluster *crv1.Pgc
143143
if restore {
144144
restoreClusterName = job.GetLabels()[config.LABEL_PG_CLUSTER]
145145
repoName = fmt.Sprintf(util.BackrestRepoDeploymentName, restoreClusterName)
146+
cleanRepo = true
146147
} else {
147148
restoreClusterName = cluster.Spec.PGDataSource.RestoreFrom
148149
repoName = fmt.Sprintf(util.BackrestRepoDeploymentName, restoreClusterName)

0 commit comments

Comments
 (0)