From c29a207a74d95723836e9cfd985e3627d84386ed Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Thu, 4 May 2023 16:35:51 -0400 Subject: [PATCH] add prowlarr metrics sidecar --- .../apps/download/prowlarr/helm-release.yaml | 38 +++++++++++++++++++ .../apps/download/prowlarr/kustomization.yaml | 3 +- .../prowlarr/prowlarr-exportarr-metrics.yaml | 16 ++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 cluster/apps/download/prowlarr/prowlarr-exportarr-metrics.yaml diff --git a/cluster/apps/download/prowlarr/helm-release.yaml b/cluster/apps/download/prowlarr/helm-release.yaml index c18bd4e..249d1f9 100644 --- a/cluster/apps/download/prowlarr/helm-release.yaml +++ b/cluster/apps/download/prowlarr/helm-release.yaml @@ -18,13 +18,49 @@ spec: image: repository: lscr.io/linuxserver/prowlarr tag: latest + + # Metrics sidecar + sidecars: + exportarr: + image: ghcr.io/onedr0p/exportarr:latest + args: + - prowlarr + ports: + - name: metrics + containerPort: 9000 + env: + - name: URL + value: "http://localhost" + - name: CONFIG + value: "/config/config.xml" + - name: PORT + value: 9000 + - name: ENABLE_ADDITIONAL_METRICS + value: "true" + - name: ENABLE_UNKNOWN_QUEUE_ITEMS + value: "true" + volumeMounts: + - name: config + mountPath: /config + readOnly: true + env: TZ: America/New_York + service: main: + labels: + app: prowlarr-service + ports: http: port: 9696 + + metrics: + enabled: true + port: 9000 + protocol: HTTP + probes: liveness: enabled: true @@ -39,6 +75,7 @@ spec: failureThreshold: 3 startup: enabled: false + ingress: main: enabled: true @@ -55,6 +92,7 @@ spec: - hosts: - *host secretName: wildcard-main-tls + persistence: config: enabled: true diff --git a/cluster/apps/download/prowlarr/kustomization.yaml b/cluster/apps/download/prowlarr/kustomization.yaml index ea3145d..6bf3667 100644 --- a/cluster/apps/download/prowlarr/kustomization.yaml +++ b/cluster/apps/download/prowlarr/kustomization.yaml @@ -1,4 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- ./helm-release.yaml \ No newline at end of file +- ./helm-release.yaml +- ./prowlarr-exportarr-metrics.yaml \ No newline at end of file diff --git a/cluster/apps/download/prowlarr/prowlarr-exportarr-metrics.yaml b/cluster/apps/download/prowlarr/prowlarr-exportarr-metrics.yaml new file mode 100644 index 0000000..689d5e9 --- /dev/null +++ b/cluster/apps/download/prowlarr/prowlarr-exportarr-metrics.yaml @@ -0,0 +1,16 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: prowlarr-exportarr + namespace: download + labels: + release: kube-prometheus-stack +spec: + selector: + matchLabels: + app: prowlarr-service + endpoints: + - port: metrics + interval: 3m + scrapeTimeout: 1m + path: /metrics \ No newline at end of file