From a1c80314333fde777ad4aa979bdcfa9b4930b086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatrice=20Dellac=C3=A0?= Date: Sun, 30 Mar 2025 20:47:18 +0200 Subject: [PATCH] update prometheus --- deploy/prometheus/deploy.jsonnet | 13 ++++--------- .../prometheus/manifests/prometheus-prometheus.yaml | 2 ++ .../manifests/prometheus-self-servicemonitor.yaml | 4 +--- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/deploy/prometheus/deploy.jsonnet b/deploy/prometheus/deploy.jsonnet index f0f0fdd..cb883c8 100644 --- a/deploy/prometheus/deploy.jsonnet +++ b/deploy/prometheus/deploy.jsonnet @@ -24,9 +24,8 @@ local kp = (import 'kube-prometheus/main.libsonnet') + { }, }, }, - // You may try enabling selfMonitor here if you want the built-in option, - // but as noted it doesn't work reliably: - // selfMonitor: { enabled: true }, + // selfMonitor option left commented out as it isn't working reliably + selfMonitor: { enabled: true }, }, }, }, @@ -148,8 +147,7 @@ local manifests = spec: { jobLabel: 'prometheus', selector: { - // This selector must match the labels on the Prometheus service. - // Adjust as necessary if your service uses a different label. + // Ensure this matches the labels on your Prometheus service. matchLabels: { prometheus: 'prometheus-k8s', }, @@ -157,10 +155,7 @@ local manifests = endpoints: [{ port: 'web', interval: '30s', - scheme: 'https', - tlsConfig: { - insecureSkipVerify: true, - }, + scheme: 'http' }], }, } diff --git a/deploy/prometheus/manifests/prometheus-prometheus.yaml b/deploy/prometheus/manifests/prometheus-prometheus.yaml index e5108c1..dc60954 100644 --- a/deploy/prometheus/manifests/prometheus-prometheus.yaml +++ b/deploy/prometheus/manifests/prometheus-prometheus.yaml @@ -46,6 +46,8 @@ spec: fsGroup: 2000 runAsNonRoot: true runAsUser: 1000 + selfMonitor: + enabled: true serviceAccountName: prometheus-k8s serviceMonitorNamespaceSelector: {} serviceMonitorSelector: {} diff --git a/deploy/prometheus/manifests/prometheus-self-servicemonitor.yaml b/deploy/prometheus/manifests/prometheus-self-servicemonitor.yaml index 84ccd73..7de431f 100644 --- a/deploy/prometheus/manifests/prometheus-self-servicemonitor.yaml +++ b/deploy/prometheus/manifests/prometheus-self-servicemonitor.yaml @@ -9,9 +9,7 @@ spec: endpoints: - interval: 30s port: web - scheme: https - tlsConfig: - insecureSkipVerify: true + scheme: http jobLabel: prometheus selector: matchLabels: