From 2eface4d4b35616945516ab58707135b4adc9f4d Mon Sep 17 00:00:00 2001 From: Mathieu Gaubert <26342638+Synehan@users.noreply.github.com> Date: Mon, 29 Jun 2020 18:38:05 +0200 Subject: [PATCH] helm: add annotations to service monitor (#2258) --- production/helm/fluent-bit/Chart.yaml | 2 +- production/helm/fluent-bit/templates/servicemonitor.yaml | 4 ++++ production/helm/fluent-bit/values.yaml | 1 + production/helm/loki/Chart.yaml | 2 +- production/helm/loki/templates/servicemonitor.yaml | 4 ++++ production/helm/loki/values.yaml | 1 + production/helm/promtail/Chart.yaml | 2 +- production/helm/promtail/templates/servicemonitor.yaml | 4 ++++ production/helm/promtail/values.yaml | 1 + 9 files changed, 18 insertions(+), 3 deletions(-) diff --git a/production/helm/fluent-bit/Chart.yaml b/production/helm/fluent-bit/Chart.yaml index d80087036131f..1a365ab1eeec8 100644 --- a/production/helm/fluent-bit/Chart.yaml +++ b/production/helm/fluent-bit/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: "v1" name: fluent-bit -version: 0.1.3 +version: 0.1.4 appVersion: v1.5.0 kubeVersion: "^1.10.0-0" description: "Uses fluent-bit Loki go plugin for gathering logs and sending them to Loki" diff --git a/production/helm/fluent-bit/templates/servicemonitor.yaml b/production/helm/fluent-bit/templates/servicemonitor.yaml index 1cfb7a6ed9a07..162f96018f277 100644 --- a/production/helm/fluent-bit/templates/servicemonitor.yaml +++ b/production/helm/fluent-bit/templates/servicemonitor.yaml @@ -11,6 +11,10 @@ metadata: {{- if .Values.serviceMonitor.additionalLabels }} {{ toYaml .Values.serviceMonitor.additionalLabels | indent 4 }} {{- end }} + {{- if .Values.serviceMonitor.annotations }} + annotations: +{{ toYaml .Values.serviceMonitor.annotations | indent 4 }} + {{- end }} spec: selector: matchLabels: diff --git a/production/helm/fluent-bit/values.yaml b/production/helm/fluent-bit/values.yaml index 673e09eb836bd..2138c888cb268 100644 --- a/production/helm/fluent-bit/values.yaml +++ b/production/helm/fluent-bit/values.yaml @@ -109,4 +109,5 @@ serviceMonitor: enabled: false interval: "" additionalLabels: {} + annotations: {} # scrapeTimeout: 10s diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index 081f69fe24f8a..7c6c103f0cb09 100644 --- a/production/helm/loki/Chart.yaml +++ b/production/helm/loki/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: "v1" name: loki -version: 0.30.0 +version: 0.30.1 appVersion: v1.5.0 kubeVersion: "^1.10.0-0" description: "Loki: like Prometheus, but for logs." diff --git a/production/helm/loki/templates/servicemonitor.yaml b/production/helm/loki/templates/servicemonitor.yaml index 1f38cab142e36..f3b4abe532521 100644 --- a/production/helm/loki/templates/servicemonitor.yaml +++ b/production/helm/loki/templates/servicemonitor.yaml @@ -11,6 +11,10 @@ metadata: {{- if .Values.serviceMonitor.additionalLabels }} {{ toYaml .Values.serviceMonitor.additionalLabels | indent 4 }} {{- end }} + {{- if .Values.serviceMonitor.annotations }} + annotations: +{{ toYaml .Values.serviceMonitor.annotations | indent 4 }} + {{- end }} spec: selector: matchLabels: diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index 4b62a9857e2e1..05b662366e61f 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -195,6 +195,7 @@ serviceMonitor: enabled: false interval: "" additionalLabels: {} + annotations: {} # scrapeTimeout: 10s initContainers: [] diff --git a/production/helm/promtail/Chart.yaml b/production/helm/promtail/Chart.yaml index 75e9488aae532..5f5ffb2308e36 100644 --- a/production/helm/promtail/Chart.yaml +++ b/production/helm/promtail/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: "v1" name: promtail -version: 0.23.1 +version: 0.23.2 appVersion: v1.5.0 kubeVersion: "^1.10.0-0" description: "Responsible for gathering logs and sending them to Loki" diff --git a/production/helm/promtail/templates/servicemonitor.yaml b/production/helm/promtail/templates/servicemonitor.yaml index 43f8aac8c2451..7b2d3bef6da1c 100644 --- a/production/helm/promtail/templates/servicemonitor.yaml +++ b/production/helm/promtail/templates/servicemonitor.yaml @@ -11,6 +11,10 @@ metadata: {{- if .Values.serviceMonitor.additionalLabels }} {{ toYaml .Values.serviceMonitor.additionalLabels | indent 4 }} {{- end }} + {{- if .Values.serviceMonitor.annotations }} + annotations: +{{ toYaml .Values.serviceMonitor.annotations | indent 4 }} + {{- end }} spec: selector: matchLabels: diff --git a/production/helm/promtail/values.yaml b/production/helm/promtail/values.yaml index 324e7d844d6dc..270c2dc5b5293 100644 --- a/production/helm/promtail/values.yaml +++ b/production/helm/promtail/values.yaml @@ -163,6 +163,7 @@ serviceMonitor: enabled: false interval: "" additionalLabels: {} + annotations: {} # scrapeTimeout: 10s # Extra env variables to pass to the promtail container