Skip to content

Commit eec75dc

Browse files
author
Jonathan S. Katz
committed
Ensure sync replication ConfigMap is deleted on delete
The deletion task was not checking for the existence of this ConfigMap on delete, and as such it was being missed.
1 parent 43a41e5 commit eec75dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pgo-rmdata/rmdata/process.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323

2424
"github.com/crunchydata/postgres-operator/internal/config"
2525
"github.com/crunchydata/postgres-operator/internal/kubeapi"
26-
"github.com/crunchydata/postgres-operator/internal/util"
2726
crv1 "github.com/crunchydata/postgres-operator/pkg/apis/crunchydata.com/v1"
2827

2928
log "github.com/sirupsen/logrus"
@@ -47,6 +46,7 @@ const (
4746
configConfigMapSuffix = "config"
4847
leaderConfigMapSuffix = "leader"
4948
failoverConfigMapSuffix = "failover"
49+
syncConfigMapSuffix = "sync"
5050
)
5151

5252
func Delete(request Request) {
@@ -232,6 +232,8 @@ func removeClusterConfigmaps(request Request) {
232232
// next, the name of the general configuration settings configmap, which is
233233
// "`clusterName`-config"
234234
fmt.Sprintf("%s-%s", request.ClusterName, configConfigMapSuffix),
235+
// next, if there is a synchronous replication configmap, clean that up
236+
fmt.Sprintf("%s-%s", request.ClusterName, syncConfigMapSuffix),
235237
// finally, the name of the failover configmap, which is
236238
// "`clusterName`-failover"
237239
fmt.Sprintf("%s-%s", request.ClusterName, failoverConfigMapSuffix),

0 commit comments

Comments
 (0)