From 204a1d998979d8286e6de95fdf5c269698abff26 Mon Sep 17 00:00:00 2001 From: killzoner Date: Fri, 21 Mar 2025 18:52:16 +0100 Subject: [PATCH] fix(helm): expose prometheus metrics port for scraping if enabled --- charts/pgcat/Chart.yaml | 2 +- charts/pgcat/templates/deployment.yaml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/charts/pgcat/Chart.yaml b/charts/pgcat/Chart.yaml index 01294788..1970b5fd 100644 --- a/charts/pgcat/Chart.yaml +++ b/charts/pgcat/Chart.yaml @@ -5,4 +5,4 @@ maintainers: - name: PostgresML email: team@postgresml.org appVersion: "1.3.0" -version: 0.2.5 +version: 0.2.6 diff --git a/charts/pgcat/templates/deployment.yaml b/charts/pgcat/templates/deployment.yaml index 84c57f1b..75ffa888 100644 --- a/charts/pgcat/templates/deployment.yaml +++ b/charts/pgcat/templates/deployment.yaml @@ -4,6 +4,10 @@ metadata: name: {{ include "pgcat.fullname" . }} labels: {{- include "pgcat.labels" . | nindent 4 }} + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: replicas: {{ .Values.replicaCount }} selector: @@ -36,6 +40,11 @@ spec: - name: pgcat containerPort: {{ .Values.configuration.general.port }} protocol: TCP + {{- if .Values.configuration.general.enable_prometheus_exporter }} + - name: metrics + containerPort: {{ .Values.configuration.general.prometheus_exporter_port }} + protocol: TCP + {{- end }} livenessProbe: tcpSocket: port: pgcat