Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speedtest exporter : refactoring service monitor values #39

Merged
merged 1 commit into from May 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/speedtest-exporter/Chart.yaml
Expand Up @@ -28,7 +28,7 @@ keywords:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.2.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
9 changes: 2 additions & 7 deletions charts/speedtest-exporter/README.md
@@ -1,6 +1,6 @@
# speedtest-exporter

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.4](https://img.shields.io/badge/AppVersion-0.0.4-informational?style=flat-square)
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.4](https://img.shields.io/badge/AppVersion-0.0.4-informational?style=flat-square)

A Helm chart for Prometheus Speedtest exporter

Expand Down Expand Up @@ -32,12 +32,6 @@ A Helm chart for Prometheus Speedtest exporter
| imagePullSecrets | list | `[]` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| prometheus.monitor.additionalLabels | object | `{}` | |
| prometheus.monitor.enabled | bool | `false` | |
| prometheus.monitor.honorLabels | bool | `false` | |
| prometheus.monitor.interval | string | `"60m"` | |
| prometheus.monitor.namespace | string | `""` | |
| prometheus.monitor.scrapeTimeout | string | `"60s"` | |
| readOnlyRootFilesystem | bool | `true` | |
| replicas | int | `1` | |
| resources | object | `{}` | |
Expand All @@ -55,6 +49,7 @@ A Helm chart for Prometheus Speedtest exporter
| serviceAccount.create | bool | `true` | |
| serviceAccount.imagePullSecrets | list | `[]` | |
| serviceAccount.name | string | `nil` | |
| serviceMonitor.enabled | bool | `false` | |
| tolerations | list | `[]` | |

----------------------------------------------
Expand Down
13 changes: 6 additions & 7 deletions charts/speedtest-exporter/ci/test-values.yaml
Expand Up @@ -15,10 +15,9 @@ resources:
cpu: 10m
memory: 32Mi

prometheus:
monitor:
enabled: true
interval: 15m
scrapeTimeout: 60s
additionalLabels:
release: kube-prometheus-stack
serviceMonitor:
enabled: true
interval: 15m
scrapeTimeout: 60s
additionalLabels:
release: kube-prometheus-stack
12 changes: 6 additions & 6 deletions charts/speedtest-exporter/templates/servicemonitor.yaml
@@ -1,4 +1,4 @@
{{- if .Values.prometheus.monitor.enabled }}
{{- if .Values.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand All @@ -12,8 +12,8 @@ metadata:
labels:
app: {{ template "speedtest-exporter.name" . }}
{{- include "speedtest-exporter.labels" . | indent 4 }}
{{- if .Values.prometheus.monitor.additionalLabels }}
{{ toYaml .Values.prometheus.monitor.additionalLabels | indent 4 }}
{{- if .Values.serviceMonitor.additionalLabels }}
{{ toYaml .Values.serviceMonitor.additionalLabels | indent 4 }}
{{- end }}
name: {{ template "speedtest-exporter.fullname" . }}
namespace: {{ template "speedtest-exporter.namespace" . }}
Expand All @@ -23,9 +23,9 @@ spec:
app: {{ template "speedtest-exporter.name" . }}
endpoints:
- port: http
interval: {{ .Values.prometheus.monitor.interval }}
scrapeTimeout: {{ .Values.prometheus.monitor.scrapeTimeout }}
{{- if .Values.prometheus.monitor.honorLabels }}
interval: {{ .Values.serviceMonitor.interval }}
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
{{- if .Values.serviceMonitor.honorLabels }}
honorLabels: true
{{- end }}
{{- end }}
15 changes: 6 additions & 9 deletions charts/speedtest-exporter/values.yaml
Expand Up @@ -82,12 +82,9 @@ resources: {}
# cpu: 10m
# memory: 32Mi

prometheus:
monitor:
enabled: false
interval: 60m
scrapeTimeout: 60s
additionalLabels: {}
# release: kube-prometheus-stack
namespace: ""
honorLabels: false
serviceMonitor:
enabled: false
# interval: 60m
# scrapeTimeout: 60s
# additionalLabels:
# release: kube-prometheus-stack