ConfigMap populates the PgBouncer ConfigMap.
( ctx context.Context, inCluster *v1beta1.PostgresCluster, outConfigMap *corev1.ConfigMap, )
| 27 | |
| 28 | // ConfigMap populates the PgBouncer ConfigMap. |
| 29 | func 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. |
| 46 | func Secret(ctx context.Context, |