diff --git a/charts/pgcat/templates/deployment.yaml b/charts/pgcat/templates/deployment.yaml index 84c57f1b..508725c7 100644 --- a/charts/pgcat/templates/deployment.yaml +++ b/charts/pgcat/templates/deployment.yaml @@ -36,6 +36,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 diff --git a/charts/pgcat/templates/service.yaml b/charts/pgcat/templates/service.yaml index 56c4be71..1e72c16e 100644 --- a/charts/pgcat/templates/service.yaml +++ b/charts/pgcat/templates/service.yaml @@ -11,5 +11,11 @@ spec: targetPort: pgcat protocol: TCP name: pgcat + {{- if .Values.configuration.general.enable_prometheus_exporter }} + - port: {{ .Values.configuration.general.prometheus_exporter_port }} + targetPort: metrics + protocol: TCP + name: metrics + {{- end }} selector: {{- include "pgcat.selectorLabels" . | nindent 4 }}