Skip to content

Commit dc5abfc

Browse files
authored
feature: add service sessionAffinity (#34)
1 parent f808a7b commit dc5abfc

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

charts/pgbouncer/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: pgbouncer
33
description: A Helm chart for deploying PgBouncer, a PostgreSQL connection pooler, on Kubernetes
44
type: application
5-
version: 4.0.2
5+
version: 4.0.3
66
appVersion: 1.24.1
77
kubeVersion: ">= 1.31.0-0"
88
icon: https://icoretech.github.io/helm/charts/pgbouncer/logo.png

charts/pgbouncer/templates/service.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@ spec:
2121
name: psql
2222
selector:
2323
{{- include "pgbouncer.selectorLabels" . | nindent 4 }}
24+
{{- if .Values.service.sessionAffinity }}
25+
sessionAffinity: {{ .Values.service.sessionAffinity }}
26+
{{- end }}
27+
{{- if .Values.service.sessionAffinityConfig }}
28+
sessionAffinityConfig: {{ toYaml .Values.service.sessionAffinityConfig | nindent 4 }}
29+
{{- end }}

charts/pgbouncer/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ service:
6060
nodePort:
6161
# -- Internal traffic policy for the Service (Cluster or Local).
6262
internalTrafficPolicy: Cluster
63+
# -- Session Affinity for Kubernetes service, can be "None" or "ClientIP"
64+
# -- If "ClientIP", consecutive client requests will be directed to the same Pod
65+
sessionAffinity: None
66+
# -- sessionAffinityConfig Additional settings for the sessionAffinity
67+
# sessionAffinityConfig:
68+
# clientIP:
69+
# timeoutSeconds: 180
70+
sessionAffinityConfig: {}
6371

6472
# -- Additional labels to add to each PgBouncer pod.
6573
podLabels: {}

0 commit comments

Comments
 (0)