From 5fcea0bcad7aa508f68fbe56044765b7679fc28c Mon Sep 17 00:00:00 2001 From: Whyeasy Date: Thu, 2 Jul 2020 10:24:30 +0200 Subject: [PATCH] Add endpoints to service monitor --- charts/jira-exporter/Chart.yaml | 2 +- charts/jira-exporter/README.md | 3 ++- charts/jira-exporter/templates/servicemonitor.yaml | 4 ++++ charts/jira-exporter/values.yaml | 4 +++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/charts/jira-exporter/Chart.yaml b/charts/jira-exporter/Chart.yaml index dffef0e..2383efe 100644 --- a/charts/jira-exporter/Chart.yaml +++ b/charts/jira-exporter/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: jira-exporter description: A Helm chart to deploy [jira-exporter](https://github.com/Whyeasy/jira-exporter) type: application -version: 0.1.2 +version: 0.1.3 appVersion: 0.0.3 diff --git a/charts/jira-exporter/README.md b/charts/jira-exporter/README.md index 4d53d8f..d811df4 100644 --- a/charts/jira-exporter/README.md +++ b/charts/jira-exporter/README.md @@ -2,7 +2,7 @@ jira-exporter ============= A Helm chart to deploy [jira-exporter](https://github.com/Whyeasy/jira-exporter) -Current chart version is `0.1.2` +Current chart version is `0.1.3` @@ -28,6 +28,7 @@ Current chart version is `0.1.2` | service.port | int | `8080` | Service port for the exporter | | service.type | string | `"ClusterIP"` | Serive type for the exporter | | serviceMonitor.enabled | bool | `false` | Deploy a service monitor along with the exporter. | +| serviceMonitor.endpoints | list | `[]` | Specify a list of Endpoint objects | | serviceMonitor.interval | string | `""` | Set scraping interval for the service monitor. | | serviceMonitor.scrapeTimeout | string | `""` | Set scraping time out for the service monitor. | | strategy.type | string | `"RollingUpdate"` | Strategy for deploying containers | diff --git a/charts/jira-exporter/templates/servicemonitor.yaml b/charts/jira-exporter/templates/servicemonitor.yaml index c2c8860..61b4342 100644 --- a/charts/jira-exporter/templates/servicemonitor.yaml +++ b/charts/jira-exporter/templates/servicemonitor.yaml @@ -15,6 +15,10 @@ spec: {{- if .Values.serviceMonitor.scrapeTimeout }} scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }} {{- end }} + {{- with .Values.serviceMonitor.endpoints }} + endpoints: + {{- toYaml . | nindent 6 }} + {{- end }} selector: matchLabels: {{- include "jira-exporter.selectorLabels" . | nindent 6 }} diff --git a/charts/jira-exporter/values.yaml b/charts/jira-exporter/values.yaml index c26f4b2..9458ab6 100644 --- a/charts/jira-exporter/values.yaml +++ b/charts/jira-exporter/values.yaml @@ -76,4 +76,6 @@ serviceMonitor: # serviceMonitor.interval -- Set scraping interval for the service monitor. interval: "" # serviceMonitor.scrapeTimeout -- Set scraping time out for the service monitor. - scrapeTimeout: "" \ No newline at end of file + scrapeTimeout: "" + # serviceMonitor.endpoints -- Specify a list of Endpoint objects + endpoints: [] \ No newline at end of file