MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / PostgreSQL

Function PostgreSQL

internal/pgbouncer/reconcile.go:231–241  ·  view source on GitHub ↗

PostgreSQL populates outHBAs with any records needed to run PgBouncer.

(
	inCluster *v1beta1.PostgresCluster,
	outHBAs *postgres.HBAs,
)

Source from the content-addressed store, hash-verified

229
230// PostgreSQL populates outHBAs with any records needed to run PgBouncer.
231func PostgreSQL(
232 inCluster *v1beta1.PostgresCluster,
233 outHBAs *postgres.HBAs,
234) {
235 if inCluster.Spec.Proxy == nil || inCluster.Spec.Proxy.PGBouncer == nil {
236 // PgBouncer is disabled; there is nothing to do.
237 return
238 }
239
240 outHBAs.Mandatory = append(outHBAs.Mandatory, postgresqlHBAs()...)
241}

Callers 2

generatePostgresHBAsMethod · 0.92
TestPostgreSQLFunction · 0.85

Calls 1

postgresqlHBAsFunction · 0.85

Tested by 1

TestPostgreSQLFunction · 0.68