Skip to content

Commit 12212d7

Browse files
committed
Add & fix metrics endpoint
1 parent b37d105 commit 12212d7

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

charts/pgcat/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ maintainers:
55
- name: PostgresML
66
77
appVersion: "1.2.0"
8-
version: 0.2.5
8+
version: 0.2.6

charts/pgcat/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ spec:
3636
- name: pgcat
3737
containerPort: {{ .Values.configuration.general.port }}
3838
protocol: TCP
39+
- name: metrics
40+
containerPort: {{ .Values.configuration.general.prometheus_exporter_port }}
41+
protocol: TCP
3942
livenessProbe:
4043
tcpSocket:
4144
port: pgcat
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: monitoring.coreos.com/v1
2+
kind: PodMonitor
3+
metadata:
4+
name: {{ include "pgcat.fullname" . }}
5+
labels:
6+
{{- include "pgcat.labels" . | nindent 4 }}
7+
spec:
8+
podMetricsEndpoints:
9+
- interval: 10s
10+
path: /metrics
11+
scheme: http
12+
targetPort: {{ .Values.configuration.general.prometheus_exporter_port }}
13+
selector:
14+
matchLabels:
15+
app.kubernetes.io/instance: pgcat
16+
app.kubernetes.io/name: pgcat

charts/pgcat/templates/service.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,9 @@ spec:
1111
targetPort: pgcat
1212
protocol: TCP
1313
name: pgcat
14+
- port: {{ .Values.configuration.general.prometheus_exporter_port }}
15+
targetPort: metrics
16+
protocol: TCP
17+
name: metrics
1418
selector:
1519
{{- include "pgcat.selectorLabels" . | nindent 4 }}

0 commit comments

Comments
 (0)