Skip to content

Commit

Permalink
feat: Let user specify multiple replica count for pgbouncer
Browse files Browse the repository at this point in the history
Signed-off-by: Benoit Tigeot <[email protected]>
  • Loading branch information
benoittgt committed Jan 8, 2025
1 parent 732a0f0 commit b03efda
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions charts/airflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ Parameter | Description | Default
`pgbouncer.podAnnotations` | Pod annotations for the pgbouncer Deployment | `{}`
`pgbouncer.safeToEvict` | if we add the annotation: "cluster-autoscaler.kubernetes.io/safe-to-evict" = "true" | `true`
`pgbouncer.podDisruptionBudget.*` | configs for the PodDisruptionBudget of the pgbouncer | `<see values.yaml>`
`pgbouncer.replicaCount` | Pod replication capability | `<see values.yaml>`
`pgbouncer.livenessProbe.*` | configs for the pgbouncer Pods' liveness probe | `<see values.yaml>`
`pgbouncer.startupProbe.*` | configs for the pgbouncer Pods' startup probe | `<see values.yaml>`
`pgbouncer.terminationGracePeriodSeconds` | the maximum number of seconds to wait for queries upon pod termination, before force killing | `120`
Expand Down
4 changes: 2 additions & 2 deletions charts/airflow/templates/pgbouncer/pgbouncer-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ metadata:
{{- toYaml .Values.pgbouncer.annotations | nindent 4 }}
{{- end }}
spec:
replicas: 1
replicas: {{ .Values.pgbouncer.replicaCount }}
strategy:
rollingUpdate:
## multiple pgbouncer pods can safely run concurrently
Expand Down Expand Up @@ -223,4 +223,4 @@ spec:
sources:
{{- include "airflow.pgbouncer.certs_volume_sources" . | indent 14 }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/airflow/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1951,6 +1951,10 @@ pgbouncer:
##
minAvailable:

## the number of replica count. Careful, each pgbouncer instance maintains its own connection pool
##
replicaCount: 1

## configs for the pgbouncer Pods' liveness probe
##
livenessProbe:
Expand Down

0 comments on commit b03efda

Please sign in to comment.