Skip to content

Commit

Permalink
Remove dbtype for Pgbouncer
Browse files Browse the repository at this point in the history
Signed-off-by: MobarakHsn <[email protected]>
  • Loading branch information
MobarakHsn authored and HiranmoyChowdhury committed Jun 4, 2024
1 parent eacc941 commit dbd3165
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pgbouncer/kubedb_client_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ type KubeDBClientBuilder struct {
pgbouncer *api.PgBouncer
url string
podName string
backendDBType string
backendDBName string
ctx context.Context
databaseRef *api.Database
Expand Down Expand Up @@ -106,7 +105,7 @@ func (o *KubeDBClientBuilder) GetPgBouncerXormClient() (*XormClient, error) {
return nil, err
}

engine, err := xorm.NewEngine(o.backendDBType, connector)
engine, err := xorm.NewEngine(DefaultBackendDBType, connector)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -175,9 +174,6 @@ func (o *KubeDBClientBuilder) getConnectionString() (string, error) {
o.url = o.getURL()
}

if o.backendDBType == "" {
o.backendDBType = DefaultBackendDBType
}
var listeningPort int = api.PgBouncerDatabasePort
if o.pgbouncer.Spec.ConnectionPool.Port != nil {
listeningPort = int(*o.pgbouncer.Spec.ConnectionPool.Port)
Expand Down

0 comments on commit dbd3165

Please sign in to comment.