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
{{ message }}
Repository navigation
[Bug]: Pooler and DatabaseRole reconcilers keep recreating owned resources during deletion, blocking external finalizers (e.g. ArgoCD foreground pruning) #11360
I have searched for an existing issue, and could not find anything. I believe this is a new bug.
I have read the troubleshooting guide
I have read the troubleshooting guide and I think this is a new bug.
I am running a supported version of CloudNativePG
I have read the troubleshooting guide and I think this is a new bug.
Contact Details
No response
Version
1.30.0
What version of Kubernetes are you using?
1.36
What is your Kubernetes environment?
Cloud: Amazon EKS
How did you install the operator?
Helm
What happened?
When a Pooler or DatabaseRole object has a deletionTimestamp set but is not yet fully deleted (e.g. because an external controller such as ArgoCD has added a finalizer for foreground pruning), the corresponding CloudNativePG reconciler does not check for the deletion tinormal reconciliation. As a result, the owned
external controller such as ArgoCD has added pruning), the corresponding CloudNativePGreconciler does not check for the deletion timestamp before continuing normal reconciliation. As a result, the owned resources are continuously recreated/updated:
PoolerReconciler.Reconcile recreates/updates the owned Deployment and Service for a Pooler that is being deleted.
DatabaseRoleReconciler.Reconcile recreates the owned client-certificate Secret for a DatabaseRole that is being deleted.
Because the owned resources are kept alive, the object never actually becomes empty of dependents, and any external
finalizer relying on garbage collection to obte (e.g. ArgoCD's foreground pruning policy)
never clears, leaving the resource stuck in a
To Reproduce
Configure ArgoCD (or any tool using Kubernropagation) to manage a Pooler (or
DatabaseRole) resource, with the default fore
Delete the resource (e.g. via ArgoCD sync/
Observe that the Pooler's Deployment/Serviclient cert Secret) keeps getting recreated by
the operator, and the parent resource never f
Expected behavior
Once metadata.deletionTimestamp is set on a P operator should stop reconciling/recreating
the resources it owns, so Kubernetes garbage al finalizers) can proceed normally.
Additional context
Reported in discussion #4010 ("Delete Pooler goCD pruning"). Other reconcilers already
guard against this correctly (cluster_controleletionTimestamp(), plugin_controller.go
checks service.DeletionTimestamp.IsZero()), but databaserole_controller.go did not.
Cluster resource
Relevant log output
Code of Conduct
I agree to follow this project's Code of Conduct
Reacted by dosubot, Serge, shchelok, Alex Leyn, drond, v-ganin, Ivan Anzin, progr404, Michael, Nail Khairullin and 4 more
We are facing the same issue. It prevents us from provisioning and reprovisioning instances of our application without manual intervention. CNPG 1.30.0, k8s 1.34
I've been trying to respectfully look for a reviewer for my PR and have left a message in the #cloudnativepg-dev slack channel to hopefully get some eyes on this. I personally agree that it's quite an impactful issue.
@gbartolini are you the right person to ask to review #11359 (or at least enable the first pass of CI to run)? I noticed you're a maintainer and unsure what the 👍 emoji on my previous comment means
Sorry for the wide blast, but it's been many weeks and I believe this bug is fairly impactful. Can a maintainer please approve CI (and ideally review) #11359 please? If I can provide any information to push this forward, let me know!
Activity
mearsten commentedon Sep 3, 2026
We're experiencing similar problem with werf (it sets a finalizer too). CNPG 1.30.0, k8s 1.34.
mou commentedon Sep 3, 2026
We are facing the same issue. It prevents us from provisioning and reprovisioning instances of our application without manual intervention. CNPG 1.30.0, k8s 1.34
mjlshen commentedon Sep 4, 2026
I've been trying to respectfully look for a reviewer for my PR and have left a message in the #cloudnativepg-dev slack channel to hopefully get some eyes on this. I personally agree that it's quite an impactful issue.
mjlshen commentedon Sep 10, 2026
@gbartolini are you the right person to ask to review #11359 (or at least enable the first pass of CI to run)? I noticed you're a maintainer and unsure what the 👍 emoji on my previous comment means
mjlshen commentedon Sep 20, 2026
@fcanovai @leonardoce @mnencia @armru
Sorry for the wide blast, but it's been many weeks and I believe this bug is fairly impactful. Can a maintainer please approve CI (and ideally review) #11359 please? If I can provide any information to push this forward, let me know!
fix(controller): skip reconciliation of Pooler/DatabaseRole objects b…
fix(controller): skip reconciliation of Pooler/DatabaseRole objects b…
fix(controller): skip reconciliation of Pooler/DatabaseRole objects b…
fix(controller): skip reconciliation of Pooler/DatabaseRole objects b…