diff --git a/rocketchat/templates/chat-deployment.yaml b/rocketchat/templates/chat-deployment.yaml index 07bd181..1f5bbc8 100644 --- a/rocketchat/templates/chat-deployment.yaml +++ b/rocketchat/templates/chat-deployment.yaml @@ -150,8 +150,10 @@ spec: ports: - name: http containerPort: 3000 + {{- if .Values.prometheusScraping.enabled }} - name: metrics - containerPort: 9458 + containerPort: {{ .Values.prometheusScraping.port }} + {{- end}} {{- if .Values.livenessProbe.enabled }} livenessProbe: httpGet: @@ -214,4 +216,4 @@ spec: app.kubernetes.io/name: {{ include "rocketchat.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/rocketchat/templates/service.yaml b/rocketchat/templates/service.yaml index 50b69f4..3ef9ca8 100644 --- a/rocketchat/templates/service.yaml +++ b/rocketchat/templates/service.yaml @@ -30,6 +30,12 @@ spec: nodePort: {{ $service.nodePort }} {{- end }} protocol: TCP + {{- if .Values.prometheusScraping.enabled }} + - name: metrics + port: {{ .Values.prometheusScraping.port }} + targetPort: metrics + protocol: TCP + {{- end }} selector: app.kubernetes.io/name: {{ include "rocketchat.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} \ No newline at end of file + app.kubernetes.io/instance: {{ .Release.Name }}