---
apiVersion: v1
kind: ConfigMap
metadata:
  name: pgbouncer-configmap
  labels:
    app.kubernetes.io/name: pgbouncer
    app.kubernetes.io/instance: pgbouncer
    app.kubernetes.io/managed-by: provisioner
data:
  pgbouncer.ini: |
    [pgbouncer]
    listen_addr = *
    listen_port = 5432
    auth_file = /etc/userlist/userlist.txt
    admin_users = admin
    ignore_startup_parameters = extra_float_digits
    tcp_keepalive = 1
    tcp_keepcnt = 5
    tcp_keepidle = 5
    tcp_keepintvl = 1
    server_round_robin = 1
    log_disconnections = 1
    log_connections = 1
    pool_mode = transaction
    min_pool_size = 1
    default_pool_size = 5
    reserve_pool_size = 20
    reserve_pool_timeout = 1
    max_client_conn = 10000
    max_db_connections = 50
    server_reset_query_always = 1
    [databases]
    * =
