diff --git a/pgbouncer/client.go b/pgbouncer/client.go index 539de891..787cab90 100644 --- a/pgbouncer/client.go +++ b/pgbouncer/client.go @@ -32,6 +32,7 @@ type Client struct { type XormClient struct { *xorm.Engine + podName string } type XormClientList struct { diff --git a/pgbouncer/kubedb_client_builder.go b/pgbouncer/kubedb_client_builder.go index 1511dd3e..5d18d2a3 100644 --- a/pgbouncer/kubedb_client_builder.go +++ b/pgbouncer/kubedb_client_builder.go @@ -117,6 +117,7 @@ func (o *KubeDBClientBuilder) GetPgBouncerXormClient() (*XormClient, error) { engine.SetDefaultContext(o.ctx) return &XormClient{ engine, + o.podName, }, nil } @@ -211,6 +212,7 @@ func GetXormClientList(kc client.Client, pb *api.PgBouncer, ctx context.Context, if len(clientlist.List) != int(*pb.Spec.Replicas) { return nil, fmt.Errorf("Failed to generate Xorm Client List") } + return clientlist, nil }