From 5e66b231a1ffdaf9953cb6e4e36b74b5ccf1623e Mon Sep 17 00:00:00 2001 From: AKYD <2852960+AKYD@users.noreply.github.com> Date: Wed, 10 Apr 2024 00:59:55 +0300 Subject: [PATCH 1/5] Fix env for jiralert chart (#4435) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jan-Otto Kröpke --- charts/jiralert/Chart.yaml | 2 +- charts/jiralert/templates/deployment.yaml | 2 +- charts/jiralert/values.yaml | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/charts/jiralert/Chart.yaml b/charts/jiralert/Chart.yaml index 111a0978bd37..2900efa5bb6c 100755 --- a/charts/jiralert/Chart.yaml +++ b/charts/jiralert/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: jiralert description: A Helm chart for Kubernetes to install jiralert type: application -version: 1.7.0 +version: 1.7.1 appVersion: "v1.3.0" home: "https://github.com/prometheus-community/jiralert" keywords: diff --git a/charts/jiralert/templates/deployment.yaml b/charts/jiralert/templates/deployment.yaml index f99c48cf9df4..38b74d9cdf13 100755 --- a/charts/jiralert/templates/deployment.yaml +++ b/charts/jiralert/templates/deployment.yaml @@ -67,7 +67,7 @@ spec: {{- end }} {{- with .Values.env }} env: - {{- range $key, $value := .Values.env }} + {{- range $key, $value := . }} - name: {{ $key }} value: {{ $value | quote }} {{- end }} diff --git a/charts/jiralert/values.yaml b/charts/jiralert/values.yaml index 31aba329ddd9..2184de34a4a7 100755 --- a/charts/jiralert/values.yaml +++ b/charts/jiralert/values.yaml @@ -29,6 +29,9 @@ extraVolumeMounts: [] # -- Additional Volumes extraVolumes: [] +# -- Additional env for jiralert pods +env: {} + # -- Additional envFrom for jiralert pods envFrom: {} From 02bbb18e7d49c2bced877d4547e65cb4499bd12e Mon Sep 17 00:00:00 2001 From: Erwan <135604788+erwanval@users.noreply.github.com> Date: Wed, 10 Apr 2024 15:24:38 +0200 Subject: [PATCH 2/5] [prometheus-blackbox-exporter] Add values to configure HTTPS for selfmonitor (#4434) Signed-off-by: Erwan Vallienne Co-authored-by: Erwan Vallienne --- charts/prometheus-blackbox-exporter/Chart.yaml | 2 +- .../templates/selfservicemonitor.yaml | 12 ++++++++++-- charts/prometheus-blackbox-exporter/values.yaml | 4 ++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/charts/prometheus-blackbox-exporter/Chart.yaml b/charts/prometheus-blackbox-exporter/Chart.yaml index 3fa6a53585ff..a1fd739a155f 100644 --- a/charts/prometheus-blackbox-exporter/Chart.yaml +++ b/charts/prometheus-blackbox-exporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: Prometheus Blackbox Exporter name: prometheus-blackbox-exporter -version: 8.13.0 +version: 8.14.0 appVersion: v0.24.0 home: https://github.com/prometheus/blackbox_exporter sources: diff --git a/charts/prometheus-blackbox-exporter/templates/selfservicemonitor.yaml b/charts/prometheus-blackbox-exporter/templates/selfservicemonitor.yaml index 9063688ebeba..d750a5609186 100644 --- a/charts/prometheus-blackbox-exporter/templates/selfservicemonitor.yaml +++ b/charts/prometheus-blackbox-exporter/templates/selfservicemonitor.yaml @@ -15,10 +15,14 @@ spec: - path: {{ .Values.serviceMonitor.selfMonitor.path }} interval: {{ .Values.serviceMonitor.selfMonitor.interval }} scrapeTimeout: {{ .Values.serviceMonitor.selfMonitor.scrapeTimeout }} - scheme: http + scheme: {{ .Values.serviceMonitor.selfMonitor.scheme }} {{- with .Values.serviceMonitor.selfMonitor.port }} port: {{ . }} {{- end }} + {{- if .Values.serviceMonitor.selfMonitor.tlsConfig }} + tlsConfig: + {{- toYaml .Values.serviceMonitor.selfMonitor.tlsConfig | nindent 6 }} + {{- end }} {{- if .Values.serviceMonitor.selfMonitor.additionalRelabeling }} relabelings: {{- toYaml .Values.serviceMonitor.selfMonitor.additionalRelabeling | nindent 6 }} @@ -27,7 +31,11 @@ spec: - path: {{ .Values.configReloader.serviceMonitor.selfMonitor.path }} interval: {{ .Values.configReloader.serviceMonitor.selfMonitor.interval }} scrapeTimeout: {{ .Values.configReloader.serviceMonitor.selfMonitor.scrapeTimeout }} - scheme: http + scheme: {{ .Values.configReloader.serviceMonitor.selfMonitor.scheme }} + {{- if .Values.configReloader.serviceMonitor.selfMonitor.tlsConfig }} + tlsConfig: + {{- toYaml .Values.configReloader.serviceMonitor.selfMonitor.tlsConfig | nindent 6 }} + {{- end }} {{- if .Values.configReloader.serviceMonitor.selfMonitor.additionalRelabeling }} relabelings: {{- toYaml .Values.configReloader.serviceMonitor.selfMonitor.additionalRelabeling | indent 6 }} diff --git a/charts/prometheus-blackbox-exporter/values.yaml b/charts/prometheus-blackbox-exporter/values.yaml index 7c5993e55516..bf8b7beb0f73 100644 --- a/charts/prometheus-blackbox-exporter/values.yaml +++ b/charts/prometheus-blackbox-exporter/values.yaml @@ -278,6 +278,8 @@ serviceMonitor: additionalRelabeling: [] labels: {} path: /metrics + scheme: http + tlsConfig: {} interval: 30s scrapeTimeout: 30s ## Port can be defined by assigning a value for the port key below @@ -469,5 +471,7 @@ configReloader: additionalMetricsRelabels: {} additionalRelabeling: [] path: /metrics + scheme: http + tlsConfig: {} interval: 30s scrapeTimeout: 30s From 37d05a66a78f701be27ecae64fb664e5cd578f35 Mon Sep 17 00:00:00 2001 From: Thanasis Petrovas <108522410+than-pet@users.noreply.github.com> Date: Thu, 11 Apr 2024 19:20:09 +0300 Subject: [PATCH 3/5] [kube-promettheus-stack] ThanosRuler custom resource instance name (#4439) Signed-off-by: Thanasis Petrovas --- charts/kube-prometheus-stack/Chart.yaml | 2 +- charts/kube-prometheus-stack/templates/_helpers.tpl | 10 +++++++--- .../templates/thanos-ruler/ruler.yaml | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index 33a13a38145b..f8f420fe96ff 100644 --- a/charts/kube-prometheus-stack/Chart.yaml +++ b/charts/kube-prometheus-stack/Chart.yaml @@ -23,7 +23,7 @@ name: kube-prometheus-stack sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus -version: 58.0.0 +version: 58.0.1 appVersion: v0.73.0 kubeVersion: ">=1.19.0-0" home: https://github.com/prometheus-operator/kube-prometheus diff --git a/charts/kube-prometheus-stack/templates/_helpers.tpl b/charts/kube-prometheus-stack/templates/_helpers.tpl index aa0ed4c73623..731e3e0d2cb0 100644 --- a/charts/kube-prometheus-stack/templates/_helpers.tpl +++ b/charts/kube-prometheus-stack/templates/_helpers.tpl @@ -57,9 +57,13 @@ The longest name that gets created adds and extra 37 characters, so truncation s {{- end }} {{- end }} -{{/* Fullname suffixed with thanos-ruler */}} -{{- define "kube-prometheus-stack.thanosRuler.fullname" -}} -{{- printf "%s-thanos-ruler" (include "kube-prometheus-stack.fullname" .) -}} +{{/* ThanosRuler custom resource instance name */}} +{{- define "kube-prometheus-stack.thanosRuler.crname" -}} +{{- if .Values.cleanPrometheusOperatorObjectNames }} +{{- include "kube-prometheus-stack.fullname" . }} +{{- else }} +{{- print (include "kube-prometheus-stack.fullname" .) "-thanos-ruler" -}} +{{- end }} {{- end }} {{/* Shortened name suffixed with thanos-ruler */}} diff --git a/charts/kube-prometheus-stack/templates/thanos-ruler/ruler.yaml b/charts/kube-prometheus-stack/templates/thanos-ruler/ruler.yaml index b365262e6b6f..4b6b6697ce51 100644 --- a/charts/kube-prometheus-stack/templates/thanos-ruler/ruler.yaml +++ b/charts/kube-prometheus-stack/templates/thanos-ruler/ruler.yaml @@ -2,7 +2,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ThanosRuler metadata: - name: {{ template "kube-prometheus-stack.thanosRuler.name" . }} + name: {{ template "kube-prometheus-stack.thanosRuler.crname" . }} namespace: {{ template "kube-prometheus-stack.namespace" . }} labels: app: {{ include "kube-prometheus-stack.thanosRuler.name" . }} From 56ec2c6277d879f9edc689be0022ad0db927a587 Mon Sep 17 00:00:00 2001 From: Ilia Lazebnik Date: Thu, 11 Apr 2024 21:57:09 +0300 Subject: [PATCH 4/5] bump to 0.25.0 (#4442) Signed-off-by: drfaust92 --- charts/prometheus-blackbox-exporter/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/prometheus-blackbox-exporter/Chart.yaml b/charts/prometheus-blackbox-exporter/Chart.yaml index a1fd739a155f..4c6d5debb604 100644 --- a/charts/prometheus-blackbox-exporter/Chart.yaml +++ b/charts/prometheus-blackbox-exporter/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 description: Prometheus Blackbox Exporter name: prometheus-blackbox-exporter -version: 8.14.0 -appVersion: v0.24.0 +version: 8.15.0 +appVersion: v0.25.0 home: https://github.com/prometheus/blackbox_exporter sources: - https://github.com/prometheus/blackbox_exporter From c6abc8ff190ba1de2649f331db00d1b104a308f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Fri, 12 Apr 2024 14:01:14 +0200 Subject: [PATCH 5/5] [kube-prometheus-stack] Thanos Ruler: Add alertDropLabels + additional config (#4445) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [kube-prometheus-stack] Thanos Ruler: Add alertDropLabels + additionalConfig Signed-off-by: Jan-Otto Kröpke * [kube-prometheus-stack] Thanos Ruler: Add tpl to labels and additionalArgs Signed-off-by: Jan-Otto Kröpke * [kube-prometheus-stack] Thanos Ruler: Support omit externalPrefix Signed-off-by: Jan-Otto Kröpke --------- Signed-off-by: Jan-Otto Kröpke --- charts/kube-prometheus-stack/Chart.yaml | 2 +- .../templates/thanos-ruler/ruler.yaml | 18 ++++++++++++++---- charts/kube-prometheus-stack/values.yaml | 15 +++++++++++++++ 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index f8f420fe96ff..29412b88a3f3 100644 --- a/charts/kube-prometheus-stack/Chart.yaml +++ b/charts/kube-prometheus-stack/Chart.yaml @@ -23,7 +23,7 @@ name: kube-prometheus-stack sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus -version: 58.0.1 +version: 58.1.0 appVersion: v0.73.0 kubeVersion: ">=1.19.0-0" home: https://github.com/prometheus-operator/kube-prometheus diff --git a/charts/kube-prometheus-stack/templates/thanos-ruler/ruler.yaml b/charts/kube-prometheus-stack/templates/thanos-ruler/ruler.yaml index 4b6b6697ce51..908d6a45aa42 100644 --- a/charts/kube-prometheus-stack/templates/thanos-ruler/ruler.yaml +++ b/charts/kube-prometheus-stack/templates/thanos-ruler/ruler.yaml @@ -34,12 +34,12 @@ spec: externalPrefix: "{{ tpl .Values.thanosRuler.thanosRulerSpec.externalPrefix . }}" {{- else if and .Values.thanosRuler.ingress.enabled .Values.thanosRuler.ingress.hosts }} externalPrefix: "http://{{ tpl (index .Values.thanosRuler.ingress.hosts 0) . }}{{ .Values.thanosRuler.thanosRulerSpec.routePrefix }}" -{{- else }} - externalPrefix: http://{{ template "kube-prometheus-stack.thanosRuler.name" . }}.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.thanosRuler.service.port }} +{{- else if .Values.thanosRuler.thanosRulerSpec.externalPrefixNilUsesHelmValues }} + externalPrefix: "http://{{ template "kube-prometheus-stack.thanosRuler.name" . }}.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.thanosRuler.service.port }}" {{- end }} {{- if .Values.thanosRuler.thanosRulerSpec.additionalArgs }} additionalArgs: -{{ toYaml .Values.thanosRuler.thanosRulerSpec.additionalArgs | indent 4 }} +{{ tpl (toYaml .Values.thanosRuler.thanosRulerSpec.additionalArgs) $ | indent 4 }} {{- end }} {{- if .Values.thanosRuler.thanosRulerSpec.nodeSelector }} nodeSelector: @@ -123,7 +123,7 @@ spec: {{- end }} {{- if .Values.thanosRuler.thanosRulerSpec.labels }} labels: -{{ toYaml .Values.thanosRuler.thanosRulerSpec.labels | indent 4 }} +{{ tpl (toYaml .Values.thanosRuler.thanosRulerSpec.labels) $ | indent 4 }} {{- end }} {{- if .Values.thanosRuler.thanosRulerSpec.podMetadata }} podMetadata: @@ -184,6 +184,16 @@ spec: {{- if .Values.thanosRuler.thanosRulerSpec.volumeMounts }} volumeMounts: {{ toYaml .Values.thanosRuler.thanosRulerSpec.volumeMounts | indent 4 }} +{{- end }} +{{- if .Values.thanosRuler.thanosRulerSpec.alertDropLabels }} + alertDropLabels: +{{ toYaml .Values.thanosRuler.thanosRulerSpec.alertDropLabels | indent 4 }} {{- end }} portName: {{ .Values.thanosRuler.thanosRulerSpec.portName }} +{{- with .Values.thanosRuler.thanosRulerSpec.additionalConfig }} + {{- tpl (toYaml .) $ | nindent 2 }} +{{- end }} +{{- with .Values.thanosRuler.thanosRulerSpec.additionalConfigString }} + {{- tpl . $ | nindent 2 }} +{{- end }} {{- end }} diff --git a/charts/kube-prometheus-stack/values.yaml b/charts/kube-prometheus-stack/values.yaml index 754377dfd349..12649e2adeda 100644 --- a/charts/kube-prometheus-stack/values.yaml +++ b/charts/kube-prometheus-stack/values.yaml @@ -4431,6 +4431,10 @@ thanosRuler: ## externalPrefix: + ## If true, http://{{ template "kube-prometheus-stack.thanosRuler.name" . }}.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.thanosRuler.service.port }} + ## will be used as value for externalPrefix + externalPrefixNilUsesHelmValues: true + ## The route prefix ThanosRuler registers HTTP handlers for. This is useful, if using ExternalURL and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, ## but the server serves requests under a different route prefix. For example for use with kubectl proxy. ## @@ -4453,6 +4457,10 @@ thanosRuler: # access_key: "" # secret_key: "" + ## Labels by name to drop before sending to alertmanager + ## Maps to the --alert.label-drop flag of thanos ruler. + alertDropLabels: [] + ## QueryEndpoints defines Thanos querier endpoints from which to query metrics. ## Maps to the --query flag of thanos ruler. queryEndpoints: [] @@ -4593,6 +4601,13 @@ thanosRuler: ## portName: "web" + ## Additional configuration which is not covered by the properties above. (passed through tpl) + additionalConfig: {} + + ## Additional configuration which is not covered by the properties above. + ## Useful, if you need advanced templating + additionalConfigString: "" + ## ExtraSecret can be used to store various data in an extra secret ## (use it for example to store hashed basic auth credentials) extraSecret: