feat(restore): wait for all init containers before starting cluster restore by armru · Pull Request #9026 · cloudnative-pg/cloudnative-pg

@armru armru added the do not backport

This PR must not be backported - it will be in the next minor release

label

Nov 3, 2025

@dosubot dosubot bot added the lgtm

This PR has been approved by a maintainer

label

Nov 5, 2025

jbattiato

…estore

Previously, the cluster restore process immediately returned success without waiting
for any init containers to complete. This meant restore operations from backup tools
(Velero, Kasten, etc.) could start before the restore data was fully prepared.

Now the restore process actively waits for all init containers to complete before
proceeding. The implementation is tool-agnostic and correctly handles Kubernetes init
container sidecars by ignoring those with RestartPolicy=Always.

This ensures that any backup/restore solution using init containers will have
sufficient time to prepare the cluster before the restore process proceeds.

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>

@mnencia mnencia deleted the dev/improve-restore branch

November 12, 2025 15:38