Skip to content

Commit 898bd4e

Browse files
committed
fix: use correct variables for replica source
Signed-off-by: Francesco Canovai <[email protected]>
1 parent 127f94a commit 898bd4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/cnpgi/operator/config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (config *PluginConfiguration) GetRecoveryBarmanObjectKey() types.Namespaced
7979
func (config *PluginConfiguration) GetReplicaSourceBarmanObjectKey() types.NamespacedName {
8080
return types.NamespacedName{
8181
Namespace: config.Cluster.Namespace,
82-
Name: config.ReplicaSourceServerName,
82+
Name: config.ReplicaSourceBarmanObjectName,
8383
}
8484
}
8585

@@ -151,7 +151,7 @@ func NewFromCluster(cluster *cnpgv1.Cluster) *PluginConfiguration {
151151
if replicaSourceParameters := getReplicaSourceParameters(cluster); replicaSourceParameters != nil {
152152
replicaSourceBarmanObjectName = replicaSourceParameters["barmanObjectName"]
153153
replicaSourceServerName = replicaSourceParameters["serverName"]
154-
if len(recoveryServerName) == 0 {
154+
if len(replicaSourceServerName) == 0 {
155155
replicaSourceServerName = cluster.Name
156156
}
157157
}

0 commit comments

Comments
 (0)