feat: "unrecoverable" annotation by leonardoce · Pull Request #8178 · cloudnative-pg/cloudnative-pg

@dosubot dosubot bot added the E2E tests

E2E tests tickets for easy triage on release process

label

Jul 30, 2025

@eh8 eh8 mentioned this pull request

Sep 25, 2025

2 tasks

This patch make the operator look for the "alpha.cnpg.io/unrecoverable=true"
annotation in the PG instance Pods.
If such an annotation is detected, the operator will destroy the PVCs
and the Pod itself and recreate it from the other instances.

This annotation is available only for replica instances.

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>

phisco pushed a commit to phisco/cloudnative-pg that referenced this pull request

Oct 9, 2025
This patch introduces the annotation `alpha.cnpg.io/unrecoverable=true`,
which can be added to any replica instance Pod.
When this annotation is present, the operator will permanently delete
the associated instance by removing both the PVCs and the Pod itself.
Following this, the operator will recreate the missing instance from the
primary instance.

Please note that this annotation is available only for replica
instances.

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>

THE-BRAHMA pushed a commit to THE-BRAHMA/cloudnative-pg that referenced this pull request

Oct 30, 2025
This patch introduces the annotation `alpha.cnpg.io/unrecoverable=true`,
which can be added to any replica instance Pod.
When this annotation is present, the operator will permanently delete
the associated instance by removing both the PVCs and the Pod itself.
Following this, the operator will recreate the missing instance from the
primary instance.

Please note that this annotation is available only for replica
instances.

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: theBrahma <office.utpal.brahma@gmail.com>