From 51b3a9da20d51e46d611fc69c969a5f29e47a8e1 Mon Sep 17 00:00:00 2001 From: Jonny Ervine Date: Mon, 11 Oct 2021 21:05:13 +0800 Subject: [PATCH] Adding nzbget-exporter to NZBget --- nzbget/templates/service.yaml | 5 +++++ .../{deployment.yaml => statefulset.yaml} | 14 ++++++++++++++ 2 files changed, 19 insertions(+) rename nzbget/templates/{deployment.yaml => statefulset.yaml} (84%) diff --git a/nzbget/templates/service.yaml b/nzbget/templates/service.yaml index 38ec483..07157e7 100644 --- a/nzbget/templates/service.yaml +++ b/nzbget/templates/service.yaml @@ -4,6 +4,7 @@ metadata: name: {{ include "nzbget.fullname" . }} labels: {{- include "nzbget.labels" . | nindent 4 }} + k8s-app: nzbget-exporter spec: type: {{ .Values.service.type }} ports: @@ -11,5 +12,9 @@ spec: targetPort: {{ .Values.service.port }} protocol: TCP name: http + - port: 9452 + targetPort: 9452 + protocol: TCP + name: nzbget-exporter selector: {{- include "nzbget.selectorLabels" . | nindent 4 }} diff --git a/nzbget/templates/deployment.yaml b/nzbget/templates/statefulset.yaml similarity index 84% rename from nzbget/templates/deployment.yaml rename to nzbget/templates/statefulset.yaml index e1823c3..5bdb8dd 100644 --- a/nzbget/templates/deployment.yaml +++ b/nzbget/templates/statefulset.yaml @@ -24,6 +24,20 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: + - name: nzbget-metrics + image: harbor.ervine.dev/public/x86_64/alpine/nzbget-exporter:v0.1-3.13.5 + imagePullPolicy: IfNotPresent + ports: + - name: nzbget-metrics + containerPort: 9452 + protocol: TCP + env: + - name: NZBGET_HOST + value: 127.0.0.1 + - name: NZBGET_METRIC_NAMESPACE + value: media + - name: LOG_LEVEL + value: debug - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }}