File tree Expand file tree Collapse file tree 4 files changed +53
-3
lines changed
Expand file tree Collapse file tree 4 files changed +53
-3
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ apiVersion: v1
22appVersion : " 1.18.0"
33description : A Helm chart installing pgbouncer in kubernetes
44name : pgbouncer
5- version : 1.11 .0
5+ version : 1.12 .0
Original file line number Diff line number Diff line change 1+ {{- if .Values.servicePublic.enabled }}
2+ {{- $suffix := default "public" .Values.servicePublic.nameSuffix }}
3+ {{- $derivedName := printf "%s-%s" (include "pgbouncer.fullname" .) $suffix }}
4+ {{- $serviceName := default $derivedName .Values.servicePublic.nameOverride | trunc 63 | trimSuffix "-" }}
5+ apiVersion : v1
6+ kind : Service
7+ metadata :
8+ name : {{ $serviceName }}
9+ labels :
10+ app.kubernetes.io/name : {{ template "pgbouncer.name" . }}
11+ helm.sh/chart : {{ template "pgbouncer.chart" . }}
12+ app.kubernetes.io/instance : {{ .Release.Name }}
13+ app.kubernetes.io/managed-by : {{ .Release.Service }}
14+ {{- if .Values.servicePublic.annotations }}
15+ annotations :
16+ {{- toYaml .Values.servicePublic.annotations | nindent 4 }}
17+ {{- end }}
18+ spec :
19+ type : {{ default "LoadBalancer" .Values.servicePublic.type }}
20+ {{- if .Values.servicePublic.externalTrafficPolicy }}
21+ externalTrafficPolicy : {{ .Values.servicePublic.externalTrafficPolicy }}
22+ {{- end }}
23+ {{- if .Values.servicePublic.loadBalancerSourceRanges }}
24+ loadBalancerSourceRanges :
25+ {{- toYaml .Values.servicePublic.loadBalancerSourceRanges | nindent 4 }}
26+ {{- end }}
27+ ports :
28+ - port : {{ .Values.servicePublic.port }}
29+ targetPort : psql
30+ protocol : TCP
31+ name : psql
32+ {{- if .Values.servicePublic.nodePort }}
33+ nodePort : {{ .Values.servicePublic.nodePort }}
34+ {{- end }}
35+ selector :
36+ app.kubernetes.io/name : {{ template "pgbouncer.name" . }}
37+ app.kubernetes.io/instance : {{ .Release.Name }}
38+ {{- end }}
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ metadata:
88 app.kubernetes.io/instance : {{ .Release.Name }}
99 app.kubernetes.io/managed-by : {{ .Release.Service }}
1010 {{- if .Values.service.annotations }}
11- annotations :
11+ annotations :
1212 {{- toYaml .Values.service.annotations | nindent 4 }}
1313 {{- end }}
1414spec :
Original file line number Diff line number Diff line change @@ -89,11 +89,23 @@ image:
8989service :
9090 type : ClusterIP
9191 port : 5432
92+ annotations : {}
93+ loadBalancerSourceRanges : []
9294 # Set to local if want to preserve source IP for NodePort or LoadBalancer
9395 # externalTrafficPolicy: Cluster
9496 # nodePort: 30543 # when type NodePort
97+
98+ # # Optional second Service (e.g., internet-facing LoadBalancer)
99+ servicePublic :
100+ enabled : false
101+ nameSuffix : public
102+ type : LoadBalancer
103+ port : 5432
95104 annotations : {}
96105 loadBalancerSourceRanges : []
106+ # Set to local if want to preserve source IP for NodePort or LoadBalancer
107+ # externalTrafficPolicy: Local
108+ # nodePort: 30543 # when type NodePort
97109
98110# # Labels to add to the pod metadata
99111# #
@@ -260,4 +272,4 @@ serviceAccount:
260272 name : " "
261273 # # Annotations for created ServiceAccount
262274 # #
263- annotations : {}
275+ annotations : {}
You can’t perform that action at this time.
0 commit comments