diff --git a/pgbouncer/kubedb_client_builder.go b/pgbouncer/kubedb_client_builder.go index 513d39c6e..8c32023db 100644 --- a/pgbouncer/kubedb_client_builder.go +++ b/pgbouncer/kubedb_client_builder.go @@ -142,7 +142,7 @@ func (o *KubeDBClientBuilder) getBackendAuth() (string, string, error) { db := o.databaseRef - if db == nil || &db.DatabaseRef == nil { + if db == nil { return "", "", fmt.Errorf("there is no DatabaseReference found for pgBouncer %s/%s", o.pgbouncer.Namespace, o.pgbouncer.Name) } appBinding := &appbinding.AppBinding{}