feat(speedtest-prometheus): add namespace selection for serviceMonitor (#787)

Signed-off-by: Julen Dixneuf <julend@padok.fr>

Co-authored-by: Jeff Billimek <jeff@billimek.com>
This commit is contained in:
Julen Dixneuf 2021-04-14 23:09:39 +02:00 committed by GitHub
parent 1ea9ae8c14
commit 46c148edbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 3 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: speedtest-prometheus
description: Prometheus Exporter for the official Speedtest CLI
type: application
version: 2.1.3
version: 2.2.0
appVersion: 1.1.0
keywords:
- speedtest

View File

@ -1,6 +1,6 @@
# speedtest-prometheus
![Version: 2.1.3](https://img.shields.io/badge/Version-2.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0](https://img.shields.io/badge/AppVersion-1.1.0-informational?style=flat-square)
![Version: 2.2.0](https://img.shields.io/badge/Version-2.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0](https://img.shields.io/badge/AppVersion-1.1.0-informational?style=flat-square)
Prometheus Exporter for the official Speedtest CLI
@ -101,6 +101,12 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [2.2.0]
#### Added
- namespace selection for the serviceMonitor
### [2.1.1]
#### Added

View File

@ -9,6 +9,12 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [2.2.0]
#### Added
- namespace selection for the serviceMonitor
### [2.1.1]
#### Added

View File

@ -3,12 +3,18 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "speedtest-prometheus.fullname" . }}
{{- if .Values.serviceMonitor.namespace }}
namespace: {{ .Values.serviceMonitor.namespace }}
{{- end }}
labels:
{{- include "speedtest-prometheus.labels" . | nindent 4 }}
{{- with .Values.serviceMonitor.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "speedtest-prometheus.selectorLabels" . | nindent 6 }}

View File

@ -52,5 +52,5 @@ serviceMonitor:
enabled: false
interval: "60m"
scrapeTimeout: 90s
# namespace: default
# namespace: monitoring
additionalLabels: {}