diff --git a/chart/sonarr/templates/service.yaml b/chart/sonarr/templates/service.yaml index bbc91e2..a442e8a 100644 --- a/chart/sonarr/templates/service.yaml +++ b/chart/sonarr/templates/service.yaml @@ -11,5 +11,9 @@ spec: targetPort: 8989 protocol: TCP name: http + - port: 9707 + targetPort: 9707 + protocol: TCP + name: sonarr-metrics selector: {{- include "sonarr.selectorLabels" . | nindent 4 }} diff --git a/chart/sonarr/templates/statefulset.yaml b/chart/sonarr/templates/statefulset.yaml index dd3248c..619fdcb 100644 --- a/chart/sonarr/templates/statefulset.yaml +++ b/chart/sonarr/templates/statefulset.yaml @@ -23,6 +23,18 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: + - name: sonarr-metrics + image: ghcr.io/onedr0p/exportarr:latest + imagePullPolicy: IfNotPresent + ports: + - name: sonarr-metrics + containerPort: 9707 + protocol: TCP + env: + - name: PORT + value: 9707 + - name: URL + value: http://127.0.0.1:8989 - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }}