This is an automated email from the ASF dual-hosted git repository. lingsamuel pushed a commit to branch fix-servicemonitor in repository https://gitbox.apache.org/repos/asf/apisix-helm-chart.git
commit bb164f271ee92f64f21b550ac5c45f9b16b1a7d2 Author: LingSamuel <lingsamuelgr...@gmail.com> AuthorDate: Wed Feb 22 19:23:24 2023 +0800 fix: add prometheus port for apisix-gateway --- charts/apisix/templates/service-gateway.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/charts/apisix/templates/service-gateway.yaml b/charts/apisix/templates/service-gateway.yaml index 794c718..5a8380a 100644 --- a/charts/apisix/templates/service-gateway.yaml +++ b/charts/apisix/templates/service-gateway.yaml @@ -66,6 +66,12 @@ spec: {{- end }} protocol: TCP {{- end }} + {{- if .Values.serviceMonitor.enabled }} + - name: prometheus + port: {{ .Values.serviceMonitor.containerPort }} + targetPort: {{ .Values.serviceMonitor.containerPort }} + protocol: TCP + {{- end }} {{- if and .Values.gateway.stream.enabled (or (gt (len .Values.gateway.stream.tcp) 0) (gt (len .Values.gateway.stream.udp) 0)) }} {{- with .Values.gateway.stream }} {{- if (gt (len .tcp) 0) }}