From 6abbef201d5390f126cad949cf779a0dc782ae9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Tue, 16 Jan 2024 13:41:02 +0100 Subject: [PATCH 1/3] [kube-prometheus-stack] Add jkroepke as maintainer (#4025) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [kube-prometheus-stack] Add jkroepke as maintainer Signed-off-by: Jan-Otto Kröpke * Update Chart.yaml --------- Signed-off-by: Jan-Otto Kröpke Signed-off-by: Jan-Otto Kröpke Signed-off-by: Quentin Bisson Co-authored-by: Quentin Bisson Co-authored-by: André Bauer --- .github/CODEOWNERS | 2 +- charts/kube-prometheus-stack/Chart.yaml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e7f3223a549e..5466bd5ec9df 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -11,7 +11,7 @@ /charts/alertmanager/ @monotek @naseemkullah /charts/alertmanager-snmp-notifier/ @maxwo /charts/jiralert/ @jkroepke @zanhsieh -/charts/kube-prometheus-stack/ @andrewgkew @gianrubio @gkarthiks @GMartinez-Sisti @QuentinBisson @scottrigby @Xtigyro +/charts/kube-prometheus-stack/ @andrewgkew @gianrubio @gkarthiks @GMartinez-Sisti @jkroepke @QuentinBisson @scottrigby @Xtigyro /charts/kube-state-metrics/ @dotdc @mrueg @tariq1890 /charts/prom-label-proxy/ @jkroepke /charts/prometheus/ @gianrubio @naseemkullah @Xtigyro @zanhsieh @zeritti diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index d7ce98272ca0..ec7b3f22f570 100644 --- a/charts/kube-prometheus-stack/Chart.yaml +++ b/charts/kube-prometheus-stack/Chart.yaml @@ -11,6 +11,8 @@ maintainers: email: github.gkarthiks@gmail.com - name: GMartinez-Sisti email: kube-prometheus-stack@sisti.pt + - name: jkroepke + email: github@jkroepke.de - name: scottrigby email: scott@r6by.com - name: Xtigyro @@ -21,7 +23,7 @@ name: kube-prometheus-stack sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus -version: 55.8.2 +version: 55.8.3 appVersion: v0.70.0 kubeVersion: ">=1.19.0-0" home: https://github.com/prometheus-operator/kube-prometheus From b643fc51cdce790ac80fb9870b744012b896dce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Tue, 16 Jan 2024 18:30:22 +0100 Subject: [PATCH 2/3] [prometheus-blackbox-exporter] Integrate config-reloader (#4145) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Otto Kröpke --- .../prometheus-blackbox-exporter/Chart.yaml | 2 +- .../ci/config-reloader-values.yaml | 2 + .../templates/_helpers.tpl | 41 ++++++++++++++++ .../templates/daemonset.yaml | 4 ++ .../templates/deployment.yaml | 4 ++ .../templates/selfservicemonitor.yaml | 18 +++++-- .../templates/service.yaml | 6 +++ .../prometheus-blackbox-exporter/values.yaml | 47 +++++++++++++++++++ 8 files changed, 119 insertions(+), 5 deletions(-) create mode 100644 charts/prometheus-blackbox-exporter/ci/config-reloader-values.yaml diff --git a/charts/prometheus-blackbox-exporter/Chart.yaml b/charts/prometheus-blackbox-exporter/Chart.yaml index 7e428d6d79e6..6c771df86310 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.8.0 +version: 8.9.0 appVersion: v0.24.0 home: https://github.com/prometheus/blackbox_exporter sources: diff --git a/charts/prometheus-blackbox-exporter/ci/config-reloader-values.yaml b/charts/prometheus-blackbox-exporter/ci/config-reloader-values.yaml new file mode 100644 index 000000000000..ecf72c0452e6 --- /dev/null +++ b/charts/prometheus-blackbox-exporter/ci/config-reloader-values.yaml @@ -0,0 +1,2 @@ +configReloader: + enabled: true diff --git a/charts/prometheus-blackbox-exporter/templates/_helpers.tpl b/charts/prometheus-blackbox-exporter/templates/_helpers.tpl index c31d8772fff0..7eab07ff31d8 100644 --- a/charts/prometheus-blackbox-exporter/templates/_helpers.tpl +++ b/charts/prometheus-blackbox-exporter/templates/_helpers.tpl @@ -102,6 +102,15 @@ The image to use {{- with .Values.image.digest -}}@{{ .}}{{- end -}} {{- end -}} +{{/* +The image to use +*/}} +{{- define "prometheus-blackbox-exporter.config-reloader.image" -}} +{{- with (.Values.global.imageRegistry | default .Values.configReloader.image.registry) -}}{{ . }}/{{- end }} +{{- .Values.configReloader.image.repository -}}:{{- .Values.configReloader.image.tag -}} +{{- with .Values.configReloader.image.digest -}}@{{ .}}{{- end -}} +{{- end -}} + {{/* Define pod spec to be reused by highlevel resources (deployment, daemonset) */}} @@ -165,6 +174,38 @@ containers: {{- toYaml . }} {{- end -}} {{- end }} + +{{- if .Values.configReloader.enabled }} +- name: config-reloader + image: {{ include "prometheus-blackbox-exporter.config-reloader.image" . }} + imagePullPolicy: {{ .Values.configReloader.image.pullPolicy }} + args: + - --config-file={{ .Values.configPath | default "/config/blackbox.yaml" }} + - --watch-interval={{ .Values.configReloader.config.watchInterval }} + - --reload-url=http://127.0.0.1:{{ .Values.containerPort }}/-/reload + - --listen-address=:{{ .Values.configReloader.containerPort }} + - --log-format={{ .Values.configReloader.config.logFormat }} + - --log-level={{ .Values.configReloader.config.logLevel }} + {{- with .Values.resources }} + resources: +{{- toYaml . | nindent 4 }} + {{- end }} + ports: + - name: reloader-web + containerPort: {{ .Values.configReloader.containerPort }} + protocol: TCP + livenessProbe: + {{- toYaml .Values.configReloader.livenessProbe | nindent 4 }} + readinessProbe: + {{- toYaml .Values.configReloader.readinessProbe | nindent 4 }} + volumeMounts: + - mountPath: /config + name: config + {{- with .Values.configReloader.securityContext }} + securityContext: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} - name: blackbox-exporter image: {{ include "prometheus-blackbox-exporter.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} diff --git a/charts/prometheus-blackbox-exporter/templates/daemonset.yaml b/charts/prometheus-blackbox-exporter/templates/daemonset.yaml index 513a9d1da9cb..3e5e538946e0 100644 --- a/charts/prometheus-blackbox-exporter/templates/daemonset.yaml +++ b/charts/prometheus-blackbox-exporter/templates/daemonset.yaml @@ -17,11 +17,15 @@ spec: {{- if .Values.pod.labels }} {{ toYaml .Values.pod.labels | indent 8 }} {{- end }} + {{- if or (not .Values.configReloader.enabled) .Values.podAnnotations }} annotations: + {{- if not .Values.configReloader.enabled }} checksum/config: {{ toYaml .Values.config | sha256sum }} + {{- end }} {{- if .Values.podAnnotations }} {{ toYaml .Values.podAnnotations | indent 8 }} {{- end }} + {{- end }} spec: {{- include "prometheus-blackbox-exporter.podSpec" . | nindent 6 }} {{- end }} diff --git a/charts/prometheus-blackbox-exporter/templates/deployment.yaml b/charts/prometheus-blackbox-exporter/templates/deployment.yaml index 2620e994cd71..68d10a08d5bb 100644 --- a/charts/prometheus-blackbox-exporter/templates/deployment.yaml +++ b/charts/prometheus-blackbox-exporter/templates/deployment.yaml @@ -20,11 +20,15 @@ spec: {{- if .Values.pod.labels }} {{ toYaml .Values.pod.labels | indent 8 }} {{- end }} + {{- if or (not .Values.configReloader.enabled) .Values.podAnnotations }} annotations: + {{- if not .Values.configReloader.enabled }} checksum/config: {{ toYaml .Values.config | sha256sum }} + {{- end }} {{- if .Values.podAnnotations }} {{ toYaml .Values.podAnnotations | indent 8 }} {{- end }} + {{- end }} spec: {{- include "prometheus-blackbox-exporter.podSpec" . | nindent 6 }} {{- end }} diff --git a/charts/prometheus-blackbox-exporter/templates/selfservicemonitor.yaml b/charts/prometheus-blackbox-exporter/templates/selfservicemonitor.yaml index 9ea4c64474aa..56ec3030a259 100644 --- a/charts/prometheus-blackbox-exporter/templates/selfservicemonitor.yaml +++ b/charts/prometheus-blackbox-exporter/templates/selfservicemonitor.yaml @@ -16,11 +16,20 @@ spec: interval: {{ .Values.serviceMonitor.selfMonitor.interval }} scrapeTimeout: {{ .Values.serviceMonitor.selfMonitor.scrapeTimeout }} scheme: http - -{{- if .Values.serviceMonitor.selfMonitor.additionalRelabeling }} + {{- if .Values.serviceMonitor.selfMonitor.additionalRelabeling }} relabelings: -{{ toYaml .Values.serviceMonitor.selfMonitor.additionalRelabeling | indent 6 }} -{{- end }} + {{- toYaml .Values.serviceMonitor.selfMonitor.additionalRelabeling | nindent 6 }} + {{- end }} + {{- if .Values.configReloader.enabled }} + - path: {{ .Values.configReloader.serviceMonitor.selfMonitor.path }} + interval: {{ .Values.configReloader.serviceMonitor.selfMonitor.interval }} + scrapeTimeout: {{ .Values.configReloader.serviceMonitor.selfMonitor.scrapeTimeout }} + scheme: http + {{- if .Values.configReloader.serviceMonitor.selfMonitor.additionalRelabeling }} + relabelings: + {{- toYaml .Values.configReloader.serviceMonitor.selfMonitor.additionalRelabeling | indent 6 }} + {{- end }} + {{- end }} jobLabel: "{{ .Release.Name }}" selector: matchLabels: @@ -28,4 +37,5 @@ spec: namespaceSelector: matchNames: - {{ template "prometheus-blackbox-exporter.namespace" $ }} + {{- end }} diff --git a/charts/prometheus-blackbox-exporter/templates/service.yaml b/charts/prometheus-blackbox-exporter/templates/service.yaml index 7435045eb76b..598efa366402 100644 --- a/charts/prometheus-blackbox-exporter/templates/service.yaml +++ b/charts/prometheus-blackbox-exporter/templates/service.yaml @@ -23,6 +23,12 @@ spec: targetPort: http protocol: TCP name: http + {{ if .Values.configReloader.enabled }} + - port: {{ .Values.configReloader.service.port }} + targetPort: reloader-web + protocol: TCP + name: reloader-web + {{- end }} {{- if .Values.service.externalIPs }} externalIPs: {{ toYaml .Values.service.externalIPs | indent 4 }} diff --git a/charts/prometheus-blackbox-exporter/values.yaml b/charts/prometheus-blackbox-exporter/values.yaml index 7a3ed66c2bba..889fc52bc919 100644 --- a/charts/prometheus-blackbox-exporter/values.yaml +++ b/charts/prometheus-blackbox-exporter/values.yaml @@ -416,3 +416,50 @@ verticalPodAutoscaler: # Specifies whether recommended updates are applied when a Pod is started and whether recommended updates # are applied during the life of a Pod. Possible values are "Off", "Initial", "Recreate", and "Auto". updateMode: Auto + +configReloader: + enabled: false + containerPort: 8080 + config: + logFormat: logfmt + logLevel: info + watchInterval: 1m + image: + registry: quay.io + repository: prometheus-operator/prometheus-config-reloader + tag: "v0.70.0" + pullPolicy: IfNotPresent + digest: "" + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + readOnlyRootFilesystem: true + runAsNonRoot: true + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] + resources: + limits: + memory: 50Mi + requests: + cpu: 10m + memory: 20Mi + livenessProbe: + httpGet: + path: /healthz + port: reloader-web + scheme: HTTP + readinessProbe: + httpGet: + path: /healthz + port: reloader-web + scheme: HTTP + service: + port: 8080 + serviceMonitor: + selfMonitor: + additionalMetricsRelabels: {} + additionalRelabeling: [] + path: /metrics + interval: 30s + scrapeTimeout: 30s From 9f881c8af6a0a0a7f09072987f786852d4c16ad6 Mon Sep 17 00:00:00 2001 From: Maxime Leroy <19607336+maxime1907@users.noreply.github.com> Date: Tue, 16 Jan 2024 18:33:33 +0100 Subject: [PATCH 3/3] [prometheus-systemd-exporter]: add maxime1907 as chart maintainer (#4139) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [prometheus-systemd-exporter]: add maxime1907 as chart maintainer Signed-off-by: maxime1907 <19607336+maxime1907@users.noreply.github.com> * Update .github/CODEOWNERS Signed-off-by: André Bauer --------- Signed-off-by: maxime1907 <19607336+maxime1907@users.noreply.github.com> Signed-off-by: André Bauer Co-authored-by: André Bauer --- .github/CODEOWNERS | 2 +- charts/prometheus-systemd-exporter/Chart.yaml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5466bd5ec9df..8c3bb716e2a0 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -48,6 +48,6 @@ /charts/prometheus-snmp-exporter/ @miouge1 @xiu /charts/prometheus-stackdriver-exporter/ @apenney @rpahli /charts/prometheus-statsd-exporter/ @scDisorder -/charts/prometheus-systemd-exporter/ @capuche2412 +/charts/prometheus-systemd-exporter/ @capuche2412 @maxime1907 /charts/prometheus-to-sd/ @acondrat /charts/prometheus-windows-exporter/ @jkroepke diff --git a/charts/prometheus-systemd-exporter/Chart.yaml b/charts/prometheus-systemd-exporter/Chart.yaml index 7d89234d5a45..e8c4ee9c9a0b 100644 --- a/charts/prometheus-systemd-exporter/Chart.yaml +++ b/charts/prometheus-systemd-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: prometheus-systemd-exporter description: A Helm chart for prometheus systemd-exporter type: application -version: 0.1.0 +version: 0.1.1 appVersion: "0.6.0" home: https://github.com/prometheus-community/systemd_exporter sources: @@ -10,3 +10,5 @@ sources: maintainers: - name: capuche2412 email: aleroux@wiremind.io +- name: maxime1907 + email: 19607336+maxime1907@users.noreply.github.com