From 0aa3492b8b5bbe272a9cfef24e641ff0dd462fc0 Mon Sep 17 00:00:00 2001 From: pmint93 Date: Wed, 22 Nov 2023 00:51:02 +0700 Subject: [PATCH 1/2] Add pgbouncer chart's README --- charts/pgbouncer/README.md | 74 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 charts/pgbouncer/README.md diff --git a/charts/pgbouncer/README.md b/charts/pgbouncer/README.md new file mode 100644 index 0000000..ca485d7 --- /dev/null +++ b/charts/pgbouncer/README.md @@ -0,0 +1,74 @@ +# PgBouncer + +A helm chart for [PgBouncer](https://www.pgbouncer.org/) - the lightweight connection pooler for PostgreSQL + +## Introduction + +This chart bootstraps a [PgBouncer](https://www.pgbouncer.org/) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +## Get Repo Info + +```bash +helm repo add pmint93 https://pmint93.github.io/helm-charts +helm repo update +``` + +See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation. + +## Installing the Chart + +```bash +helm install [RELEASE_NAME] pmint93/pgbouncer +``` + +## Uninstalling the Chart + +```bash +helm uninstall [RELEASE_NAME] +``` + +## Configuration + +The following table lists the configurable parameters of the chart and their default values. + +| Key | Type | Default | Description | +|-------------------------------------------|-----------|-------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------| +| replicaCount | int | `1` | Desired number of pods | +| databases | object | `{}` | List of databases that PgBouncer will route to | +| users | list | `[]` | List of users and specific settings | +| connectionLimits.default_pool_size | int | `20` | Number of server connections per user/database pair | +| connectionLimits.max_client_conn | int | `200` | Maximum number of client connections allowed | +| connectionLimits.min_pool_size | int | `15` | Add more server connections to pool if below this number | +| connectionLimits.reserve_pool_size | int | `25` | How many additional connections to allow to a pool | +| connectionLimits.reserve_pool_timeout | int | `5` | If a client has not been serviced in this time, use additional connections from the reserve pool | +| logging.log_connections | int | `1` | Log successful logins | +| logging.log_disconnections | int | `1` | Log disconnections with reasons | +| logging.log_pooler_errors | int | `1` | Log error messages the pooler sends to clients | +| logging.log_stats | int | `0` | Write aggregated statistics into the log, every stats_period | +| logging.stats_period | int | `60` | Set how often aggregated statistics are written to the log | +| logging.verbose | int | `0` | Verbosity level | +| settings.auth_query | string | `"SELECT usename, passwd FROM pg_shadow WHERE usename=$1"` | Query to load user’s password from database | +| settings.auth_type | string | `"md5"` | How to authenticate users: cert, md5, scram-sha-256, plain, plain, any, hba or pam | +| settings.auth_user | string | `nil` | If set, then any user not specified in `users` will be queried through the auth_query | +| settings.pool_mode | string | `"session"` | Set the pool mode to be used for all connections | +| extraSettings | object | `{"ignore_startup_parameters":"extra_float_digits"}` | Extra settings for section [pgbouncer] in pgbouncer.ini | +| image.command | list | `[]` | Override the image's command | +| image.args | list | `["/etc/pgbouncer/pgbouncer.ini"]` | Container image args | +| image.pullPolicy | string | `"IfNotPresent"` | Container image pull policy | +| image.repository | string | `"hyperized/pgbouncer"` | Container image repository | +| image.tag | string | chart's appVersion | Container image tag | +| imagePullSecrets | list | `[]` | Container image pull secrets | +| nameOverride | string | `""` | Override the name of release | +| fullnameOverride | string | `""` | Override the fullname of release | +| podAnnotations | object | `{}` | Pod's annotations | +| podSecurityContext | object | `{}` | Security context settings for the pod | +| securityContext | object | `{}` | Security context settings for the container | +| updateStrategy | object | `{"type":"RollingUpdate","rollingUpdate":{"maxUnavailable":0}}` | The deployment update strategy settings | +| service.port | int | `5432` | Service external port | +| service.type | string | `"ClusterIP"` | ClusterIP, NodePort, or LoadBalancer | +| resources | object | `{}` | Server resource requests and limits | +| nodeSelector | object | `{}` | Node labels for pod assignment | +| tolerations | list | `[]` | Toleration labels for pod assignment | +| affinity | object | `{}` | Affinity settings for pod assignment | + +To better understand PgBouncer configuration, please refer to [this document](https://www.pgbouncer.org/config.html) From e49e1cab16fe5eec5457a61a061cb9afafd0fae0 Mon Sep 17 00:00:00 2001 From: pmint93 Date: Wed, 22 Nov 2023 00:54:57 +0700 Subject: [PATCH 2/2] Bump chart version to 0.1.1 --- charts/pgbouncer/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/pgbouncer/Chart.yaml b/charts/pgbouncer/Chart.yaml index 4745a64..efeb60f 100644 --- a/charts/pgbouncer/Chart.yaml +++ b/charts/pgbouncer/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: pgbouncer -version: "0.1.0" +version: "0.1.1" description: A Helm chart for Pgbouncer type: application home: https://github.com/pmint93/helm-charts