File tree Expand file tree Collapse file tree
addons/postgresql-cluster/15/chart/postgresql Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,11 +17,12 @@ keywords:
1717 - sql
1818 - replication
1919 - cluster
20+ - patroni
2021maintainers :
2122 - email : zhang.eamon@hotmail.com
2223 name : zhangeamon
2324name : postgresql
2425sources :
2526 - https://github.com/drycc-addons/
2627 - https://www.postgresql.org/
27- version : 15.4 .1
28+ version : 15.3 .1
Original file line number Diff line number Diff line change 1+ {{- if .Values.metrics.enabled }}
2+ apiVersion : v1
3+ kind : Service
4+ metadata :
5+ name : {{ printf "%s-metrics" (include "patroni.fullname" .) }}
6+ namespace : {{ .Release.Namespace | quote }}
7+ labels : {{- include "common.labels.standard" . | nindent 4 }}
8+ app.kubernetes.io/component : metrics
9+ {{- if .Values.commonLabels }}
10+ {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
11+ {{- end }}
12+ annotations :
13+ {{- if .Values.commonAnnotations }}
14+ {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
15+ {{- end }}
16+ {{- if .Values.metrics.service.annotations }}
17+ {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.service.annotations "context" $ ) | nindent 4 }}
18+ {{- end }}
19+ spec :
20+ type : ClusterIP
21+ sessionAffinity : {{ .Values.metrics.service.sessionAffinity }}
22+ {{- if .Values.metrics.service.clusterIP }}
23+ clusterIP : {{ .Values.metrics.service.clusterIP }}
24+ {{- end }}
25+ ports :
26+ - name : http-metrics
27+ port : {{ .Values.metrics.service.ports.metrics }}
28+ targetPort : http-metrics
29+ selector : {{- include "common.labels.matchLabels" . | nindent 4 }}
30+ app.kubernetes.io/component : patroni
31+ {{- end }}
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ kind: StatefulSet
33metadata :
44 name : {{ template "patroni.fullname" . }}
55 namespace : {{ include "common.names.namespace" . | quote }}
6- labels :
6+ labels : {{- include "common.labels.standard" . | nindent 4 }}
7+ app.kubernetes.io/component : patroni
78 app : {{ template "patroni.fullname" . }}
89 chart : {{ template "patroni.chart" . }}
910 release : {{ .Release.Name }}
@@ -13,14 +14,16 @@ spec:
1314 serviceName : {{ template "patroni.fullname" . }}
1415 replicas : {{ .Values.replicaCount }}
1516 selector :
16- matchLabels :
17+ matchLabels : {{- include "common.labels.matchLabels" . | nindent 6 }}
18+ app.kubernetes.io/component : patroni
1719 app : {{ template "patroni.fullname" . }}
1820 release : {{ .Release.Name }}
1921 cluster-name : {{ template "patroni.fullname" . }}
2022 template :
2123 metadata :
2224 name : {{ template "patroni.fullname" . }}
23- labels :
25+ labels : {{- include "common.labels.standard" . | nindent 8 }}
26+ app.kubernetes.io/component : patroni
2427 app : {{ template "patroni.fullname" . }}
2528 release : {{ .Release.Name }}
2629 cluster-name : {{ template "patroni.fullname" . }}
Original file line number Diff line number Diff line change @@ -133,6 +133,21 @@ metrics:
133133 # # usage: "GAUGE"
134134 # # description: "Size of the database in bytes"
135135 # #
136+ service :
137+ ports :
138+ metrics : 9187
139+ clusterIP : " "
140+ # # @param metrics.service.sessionAffinity Control where client requests go, to the same pod or round-robin
141+ # # Values: ClientIP or None
142+ # # ref: https://kubernetes.io/docs/user-guide/services/
143+ # #
144+ sessionAffinity : None
145+ # # @param metrics.service.annotations [object] Annotations for Prometheus to auto-discover the metrics endpoint
146+ # #
147+ annotations :
148+ prometheus.io/scrape : " true"
149+ prometheus.io/port : " {{ .Values.metrics.service.ports.metrics }}"
150+
136151 customMetrics : {}
137152 containerPort : 9187
138153 containerSecurityContext :
@@ -142,7 +157,6 @@ metrics:
142157 customLivenessProbe : {}
143158 customReadinessProbe :
144159 enabled : true
145- service : port
146160 resources : {}
147161walE :
148162 # Specifies whether Wal-E should be enabled
You can’t perform that action at this time.
0 commit comments