Commit d2a7676
Do not Delete All Cluster pgtasks After Successful rmdata Job
The PostgreSQL Operator Job controller currently deletes any/all
pgtasks for a cluster after the successful completion of any rmdata
job. Therefore, while the rmdata application itself has logic for
removing pgtasks, such as removing all cluster pgtasks when the entire
PostgreSQL cluster is deleted, other resources (pgtasks) are deleted
regardless of the specific rmdata job executed. This can lead to
confusion and unintended side effects, since a successful rmdata Job
can result in the deletion of resources, specifically pgtasks, that
were not in the scope of the rmdata Job itself for deletion. For
instance, the rmdata job executed as a result of removing a replica
after scaling down the cluster results in the deletion of all pgtasks,
for that cluster, even though the rmdata job submitted for the replica
is specifically configured not to remove pgtasks.
This change therefore ensures that the Job controller itself no longer
arbitrarily deletes cluster resources, namely the pgtasks associated
with the cluster. Instead the deletion of cluster resources is left to
the rmdata Jobs, which alone are responsible for ensuring the proper
cluster resource are deleted depending on the type of rmdata Job
submitted.1 parent 47076dc commit d2a7676
1 file changed
+1
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
| 565 | + | |
574 | 566 | | |
575 | 567 | | |
576 | 568 | | |
| |||
0 commit comments