Compare commits

...

6 Commits

Author SHA1 Message Date
3e65c6aff7 [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
2023-03-06 09:28:09 +00:00
d9ed2b2bed Bump common-chart to newest common version 2023-03-05 08:31:59 +00:00
855c04e7f3 Add PrometheusRule and ServiceMonitor to common (#47)
* Add PrometheusRule and ServiceMonitor to common

* Bump Kind version
2023-03-05 08:29:38 +00:00
renovate[bot]
067d636a28 Update external patch dep (#46)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-06 11:15:55 +01:00
renovate[bot]
37bfd4bdd5 Update helm/chart-testing-action action to v2.3.0 (#45)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-01 07:50:30 +01:00
396816c4a0 [all] Fix PrometheusRule and ServiceMonitor after Common upgrade 2022-08-29 08:07:11 +01:00
25 changed files with 82 additions and 36 deletions

1
.github/ct.yaml vendored
View File

@@ -8,3 +8,4 @@ chart-repos:
- k8s-at-home-libraries=https://library-charts.k8s-at-home.com
- k8s-at-home=https://k8s-at-home.com/charts
- jetstack=https://charts.jetstack.io
- nikdoof=https://nikdoof.github.io/helm-charts/

View File

@@ -21,7 +21,7 @@ jobs:
python-version: 3.7
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.2.1
uses: helm/chart-testing-action@v2.3.1
- name: Run chart-testing (list-changed)
id: list-changed
@@ -37,7 +37,7 @@ jobs:
- name: Create k3d cluster
uses: nolar/setup-k3d-k3s@v1
with:
version: v1.19
version: v1.23
if: steps.list-changed.outputs.changed == 'true'
- name: Remove node taints

View File

@@ -25,7 +25,7 @@ jobs:
version: v3.4.0
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.4.0
uses: helm/chart-releaser-action@v1.4.1
with:
charts_repo_url: https://nikdoof.github.io/helm-charts
env:

View File

@@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 0.2.1
description: A prometheus exporter for the Andrew & Arnold CHAOS API
name: aaisp-exporter
version: 0.2.1
version: 0.2.2
kubeVersion: ">=1.16.0-0"
keywords:
- aaisp-exporter

View File

@@ -1,4 +1,5 @@
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
{{- include "common.values.setup" . -}}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:

View File

@@ -1,4 +1,5 @@
{{- if .Values.metrics.enabled }}
{{- include "common.values.setup" . -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:

View File

@@ -2,10 +2,10 @@
apiVersion: v2
description: A simple wrapper chart around the common chart
name: common-chart
version: 1.2.2
version: 1.2.3
maintainers:
- name: nikdoof
dependencies:
- name: common
repository: https://nikdoof.github.io/helm-charts/
version: 4.5.2
version: 4.5.3

View File

@@ -2,7 +2,7 @@ apiVersion: v2
name: common
description: Common chart library, based off KaH's common
type: library
version: 4.5.2
version: 4.5.3
kubeVersion: ">=1.16.0-0"
keywords:
- common

View File

@@ -55,4 +55,12 @@ Main entrypoint for the common library chart. It will render all underlying temp
{{- if .Values.secret -}}
{{ include "common.secret" . | nindent 0 }}
{{- end -}}
{{- if .Values.metrics.enabled -}}
{{ include "common.serviceMonitor" . | nindent 0 }}
{{- end -}}
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled -}}
{{ include "common.prometheusRule" . | nindent 0 }}
{{- end -}}
{{- end -}}

View File

@@ -1,4 +1,5 @@
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
{{- define "common.prometheusRule" }}
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
@@ -12,15 +13,6 @@ 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 }}

View File

@@ -1,4 +1,5 @@
{{- if .Values.metrics.enabled }}
{{- define "common.serviceMonitor" }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:

View File

@@ -472,6 +472,32 @@ resources: {}
# cpu: 100m
# memory: 128Mi
metrics:
# -- Enable metrics collections with serviceMonitor
# @default -- See values.yaml
enabled: false
serviceMonitor:
interval: 3m
scrapeTimeout: 1m
labels: {}
# -- Enable and configure Prometheus Rules for the chart under this key.
# @default -- See values.yaml
prometheusRule:
enabled: false
labels: {}
# -- Configure additionial rules for the chart under this key.
# @default -- See prometheusrules.yaml
rules: []
# - alert: SonarrDown
# annotations:
# description: Sonarr service is down.
# summary: Sonarr is down.
# expr: |
# sonarr_system_status == 0
# for: 5m
# labels:
# severity: critical
# -- The common chart supports several add-ons. These can be configured under this key.
# @default -- See below
addons:

View File

@@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 0.1.2
description: A prometheus exporter for the HG612 modem
name: hg612-exporter
version: 1.2.1
version: 1.2.2
kubeVersion: ">=1.16.0-0"
keywords:
- hg612-exporter

View File

@@ -1,4 +1,5 @@
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
{{- include "common.values.setup" . -}}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:

View File

@@ -1,4 +1,5 @@
{{- if .Values.metrics.enabled }}
{{- include "common.values.setup" . -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:

View File

@@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 1.0.0
description: A prometheus exporter for generic MQTT metrics
name: mqtt-exporter
version: 1.1.1
version: 1.1.2
kubeVersion: ">=1.16.0-0"
keywords:
- mqtt-exporter

View File

@@ -1,4 +1,5 @@
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
{{- include "common.values.setup" . -}}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:

View File

@@ -1,4 +1,5 @@
{{- if .Values.metrics.enabled }}
{{- include "common.values.setup" . -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:

View File

@@ -1,8 +1,8 @@
apiVersion: v2
appVersion: 0.2.2
appVersion: 0.2.3
description: A prometheus exporter for Plex Media Server
name: plex-exporter
version: 0.1.1
version: 0.1.3
kubeVersion: ">=1.16.0-0"
keywords:
- plex-exporter
@@ -16,5 +16,4 @@ maintainers:
dependencies:
- name: common
repository: https://nikdoof.github.io/helm-charts/
version: 4.5.2
version: 4.5.3

View File

@@ -0,0 +1,5 @@
---
plex:
autodiscover: true
token: a0a0a0a0a0
loglevel: debug

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

@@ -9,7 +9,7 @@ image:
# -- image repository
repository: granra/plex_exporter
# -- image tag
tag: v0.2.2
tag: v0.2.3
# -- image pull policy
pullPolicy: IfNotPresent
@@ -42,6 +42,8 @@ plex:
token:
# -- Enable autodiscover using plex.tv
autodiscover: true
# -- Logging level
# loglevel: info
metrics:
# -- Enable and configure a Prometheus serviceMonitor for the chart under this key.
@@ -58,13 +60,13 @@ metrics:
labels: {}
# -- Configure additionial rules for the chart under this key.
# @default -- See prometheusrules.yaml
rules: []
# - alert: plexExporterAbsent
# annotations:
# description: plex Exporter has disappeared from Prometheus service discovery.
# summary: plex Exporter is down.
# expr: |
# absent(up{job=~".*plexexporter.*"} == 1)
# for: 5m
# labels:
# severity: critical
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

View File

@@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 0.18.2
description: A prometheus exporter for vSphere vCenter
name: vmware-exporter
version: 0.2.1
version: 0.2.2
kubeVersion: ">=1.16.0-0"
keywords:
- vmware-exporter

View File

@@ -1,4 +1,5 @@
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
{{- include "common.values.setup" . -}}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:

View File

@@ -1,4 +1,5 @@
{{- if .Values.metrics.enabled }}
{{- include "common.values.setup" . -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata: