pgbouncer

by Estaid

Helm chartv1.0.7App 1.22.0MITVerified publisher

A Helm chart for deploying pgbouncer on Kubernetes

About this chart

pgBouncer Helm Chart

This chart deploys a pgBouncer instance to Kubernetes.

Description

This Helm chart deploys pgbouncer on Kubernetes, providing a highly efficient connection pooler for PostgreSQL database. It's designed to reduce the processing time and resources required by managing a large number of client connections to PostgreSQL servers.

Chart Details

  • Chart Version: 1.0.1
  • App Version: 1.22.1
  • Kubernetes Version: >= 1.20.0-0

Installing the Chart

To install the chart with the release name my-release:

helm repo add estaid-app https://estaid-app.github.io/helm
helm install my-release estaid-app/pgbouncer

Configuration

The following table lists the configurable parameters of the pgbouncer chart and their default values.

ParameterDescriptionDefault
replicaCountReplica count for the Deployment1
nameOverrideOverride name of the deployment""
fullnameOverrideOverride the full name of the deployment""
updateStrategyThe update strategy to apply to the Deployment (Recreate/RollingUpdate){}
updateStrategy.typeType of update strategyRollingUpdate or Recreate
updateStrategy.rollingUpdateThe rolling update configuration{}
updateStrategy.rollingUpdate.maxUnavailableThe maximum number of pods that can be unavailable during the update1
updateStrategy.rollingUpdate.maxSurgeThe maximum number of pods that can be scheduled above the desired number of pods25%
minReadySecondsMinimum number of seconds for which a newly created pod should be ready0
revisionHistoryLimitThe number of old ReplicaSets to retain to allow rollback10
imagePullSecretsOptional array of imagePullSecrets containing private registry credentials[]
image.registryContainer image registry""
image.repositoryContainer image repositoryghcr.io/estaid-app/pgbouncer-docker
image.tagContainer image tag1.22.0
image.pullPolicyImage pull policyIfNotPresent
service.typeService typeClusterIP
service.portService port5432
podLabelsLabels to add to the pod metadata{}
podAnnotationsAnnotations to add to the pod metadata{}
extraEnvsAdditional environment variables to set[]
resourcesPod resources for scheduling/limiting{}
nodeSelectorNode labels for pod assignment{}
lifecycleLifecycle hooks{}
tolerationsTolerations for pod assignment[]
affinityAffinity and anti-affinity{}
priorityClassNamePriority of pods""
runtimeClassNameRuntime class for pods""
pgbouncerConfiguration specific to pgbouncer.{}
databasesDatabase configuration for connection pooling.{}
userlistList of users allowed to connect through pgbouncer. See auth_file{}
extraContainersAdditional containers to be added to the pods[]
extraInitContainersContainers, which are run before the app containers are started[]
extraVolumeMountsAdditional volumeMounts to the main container[]
extraVolumesAdditional volumes to the pods[]
podDisruptionBudget.enabledIf a PodDisruptionBudget resource is createdfalse
serviceAccount.nameName of the Service Account""
serviceAccount.annotationsAnnotations for created Service Account{}
terminationGracePeriodSecondsTermination grace period (in seconds)60

License

MIT

Deploy pgbouncer with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has pgbouncer on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartpgbouncer is pinned at v1.0.7 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply