From 642b4c3e0a26bfe0c6f5da50b2ed3ce38fb21ed5 Mon Sep 17 00:00:00 2001 From: nolte Date: Sun, 7 Nov 2021 18:42:37 +0100 Subject: [PATCH] add fritz exporter --- charts/stable/fritz-exporter/.helmignore | 26 ++++++++ charts/stable/fritz-exporter/Chart.yaml | 22 +++++++ .../stable/fritz-exporter/templates/NOTES.txt | 1 + .../fritz-exporter/templates/common.yaml | 1 + .../templates/servicemonitor.yaml | 24 +++++++ charts/stable/fritz-exporter/values.yaml | 65 +++++++++++++++++++ 6 files changed, 139 insertions(+) create mode 100644 charts/stable/fritz-exporter/.helmignore create mode 100644 charts/stable/fritz-exporter/Chart.yaml create mode 100644 charts/stable/fritz-exporter/templates/NOTES.txt create mode 100644 charts/stable/fritz-exporter/templates/common.yaml create mode 100644 charts/stable/fritz-exporter/templates/servicemonitor.yaml create mode 100644 charts/stable/fritz-exporter/values.yaml diff --git a/charts/stable/fritz-exporter/.helmignore b/charts/stable/fritz-exporter/.helmignore new file mode 100644 index 0000000..4379e2b --- /dev/null +++ b/charts/stable/fritz-exporter/.helmignore @@ -0,0 +1,26 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# OWNERS file for Kubernetes +OWNERS +# helm-docs templates +*.gotmpl diff --git a/charts/stable/fritz-exporter/Chart.yaml b/charts/stable/fritz-exporter/Chart.yaml new file mode 100644 index 0000000..fff4917 --- /dev/null +++ b/charts/stable/fritz-exporter/Chart.yaml @@ -0,0 +1,22 @@ +apiVersion: v2 +appVersion: v2.0.0 +description: FritzBox Exporter +name: fritz-exporter +version: 0.0.1 +kubeVersion: ">=1.16.0-0" +keywords: +- fritz-exporter +- fritzbox +home: https://github.com/k8s-at-home/charts/tree/master/charts/incubator/fritzbox-exporter +sources: +- https://github.com/pdreker/fritz_exporter +maintainers: [] +dependencies: +- name: common + repository: https://library-charts.k8s-at-home.com + version: 4.0.1 +- name: external-secrets-manifests + version: 0.1.1 + repository: https://nolte.github.io/helm-charts-repo/ + alias: externalsecrets + condition: externalsecrets.enabled \ No newline at end of file diff --git a/charts/stable/fritz-exporter/templates/NOTES.txt b/charts/stable/fritz-exporter/templates/NOTES.txt new file mode 100644 index 0000000..90f7b65 --- /dev/null +++ b/charts/stable/fritz-exporter/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "common.notes.defaultNotes" . -}} diff --git a/charts/stable/fritz-exporter/templates/common.yaml b/charts/stable/fritz-exporter/templates/common.yaml new file mode 100644 index 0000000..a6613c2 --- /dev/null +++ b/charts/stable/fritz-exporter/templates/common.yaml @@ -0,0 +1 @@ +{{ include "common.all" . }} diff --git a/charts/stable/fritz-exporter/templates/servicemonitor.yaml b/charts/stable/fritz-exporter/templates/servicemonitor.yaml new file mode 100644 index 0000000..b424548 --- /dev/null +++ b/charts/stable/fritz-exporter/templates/servicemonitor.yaml @@ -0,0 +1,24 @@ +{{- if .Values.metrics.enabled }} +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 }} diff --git a/charts/stable/fritz-exporter/values.yaml b/charts/stable/fritz-exporter/values.yaml new file mode 100644 index 0000000..67a5d1f --- /dev/null +++ b/charts/stable/fritz-exporter/values.yaml @@ -0,0 +1,65 @@ +# +# IMPORTANT NOTE +# +# This chart inherits from our common library chart. You can check the default values/options here: +# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml +# + +image: + # -- image repository + repository: pdreker/fritz_exporter + # -- image tag + tag: v2.0.0 + # -- image pull policy + pullPolicy: IfNotPresent + +controller: + strategy: RollingUpdate + + +# -- environment variables. See [application docs](https://docs.miguelndecarvalho.pt/projects/speedtest-exporter/) for more details. +# @default -- See below +env: + # -- Set the container timezone + TZ: UTC + +# -- Configures service settings for the chart. +# @default -- See values.yaml +service: + main: + ports: + http: + enabled: false + metrics: + enabled: true + protocol: TCP + port: 9787 + +metrics: + # -- Enable and configure a Prometheus serviceMonitor for the chart under this key. + # @default -- See values.yaml + enabled: false + serviceMonitor: + labels: {} + + +envFrom: + - secretRef: + name: fritz-creds + +externalsecrets: + enabled: true + secrets: + fritz-creds: + data: + - key: secrets-tf/data/services/router-fritz-box/users/admin + name: FRITZ_HOSTNAME + property: endpoint + + - key: secrets-tf/data/services/router-fritz-box/users/admin + name: FRITZ_USERNAME + property: username + + - key: secrets-tf/data/services/router-fritz-box/users/admin + name: FRITZ_PASSWORD + property: password \ No newline at end of file