[plex-exporter] Update to common, add loglevel argument (#48)

* [plex-exporter] Update to common, add loglevel argument

* Fix empty lines

* Clean linting

* Add missing repo to ct
This commit is contained in:
2023-03-06 09:28:09 +00:00
committed by GitHub
parent d9ed2b2bed
commit 3e65c6aff7
7 changed files with 26 additions and 68 deletions

View File

@@ -14,6 +14,10 @@ args:
- "--token"
- "{{ .Values.plex.token }}"
{{ end }}
{{ if .Values.plex.loglevel }}
- "--log-level"
- "{{ .Values.plex.loglevel }}"
{{ end }}
{{- end -}}
{{- $_ := mergeOverwrite .Values (include "plex-exporter.harcodedValues" . | fromYaml) -}}

View File

@@ -1,28 +0,0 @@
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
{{- include "common.values.setup" . -}}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels" . | nindent 4 }}
{{- with .Values.metrics.prometheusRule.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
groups:
- name: {{ include "common.names.fullname" . }}
rules:
- alert: PlexExporterAbsent
annotations:
description: Plex Exporter has disappeared from Prometheus service discovery.
summary: Plex Exporter is down.
expr: |
absent(up{job=~".*{{ include "common.names.fullname" . }}.*"} == 1)
for: 5m
labels:
severity: critical
{{- with .Values.metrics.prometheusRule.rules }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}

View File

@@ -1,25 +0,0 @@
{{- if .Values.metrics.enabled }}
{{- include "common.values.setup" . -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels" . | nindent 4 }}
{{- with .Values.metrics.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
{{- include "common.labels.selectorLabels" . | nindent 6 }}
endpoints:
- port: metrics
{{- with .Values.metrics.serviceMonitor.interval }}
interval: {{ . }}
{{- end }}
{{- with .Values.metrics.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ . }}
{{- end }}
path: /metrics
{{- end }}