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

Function ConfigMap

internal/pgbouncer/reconcile.go:29–43  ·  view source on GitHub ↗

ConfigMap populates the PgBouncer ConfigMap.

(
	ctx context.Context,
	inCluster *v1beta1.PostgresCluster,
	outConfigMap *corev1.ConfigMap,
)

Source from the content-addressed store, hash-verified

27
28// ConfigMap populates the PgBouncer ConfigMap.
29func ConfigMap(
30 ctx context.Context,
31 inCluster *v1beta1.PostgresCluster,
32 outConfigMap *corev1.ConfigMap,
33) {
34 if inCluster.Spec.Proxy == nil || inCluster.Spec.Proxy.PGBouncer == nil {
35 // PgBouncer is disabled; there is nothing to do.
36 return
37 }
38
39 initialize.Map(&outConfigMap.Data)
40
41 outConfigMap.Data[emptyConfigMapKey] = ""
42 outConfigMap.Data[iniFileConfigMapKey] = clusterINI(ctx, inCluster)
43}
44
45// Secret populates the PgBouncer Secret.
46func Secret(ctx context.Context,

Callers 2

TestConfigMapFunction · 0.70

Calls 2

MapFunction · 0.92
clusterINIFunction · 0.85

Tested by 1

TestConfigMapFunction · 0.56