update prometheus

This commit is contained in:
2025-03-30 20:47:18 +02:00
parent 9291ca3249
commit a1c8031433
3 changed files with 7 additions and 12 deletions

View File

@@ -24,9 +24,8 @@ local kp = (import 'kube-prometheus/main.libsonnet') + {
}, },
}, },
}, },
// You may try enabling selfMonitor here if you want the built-in option, // selfMonitor option left commented out as it isn't working reliably
// but as noted it doesn't work reliably: selfMonitor: { enabled: true },
// selfMonitor: { enabled: true },
}, },
}, },
}, },
@@ -148,8 +147,7 @@ local manifests =
spec: { spec: {
jobLabel: 'prometheus', jobLabel: 'prometheus',
selector: { selector: {
// This selector must match the labels on the Prometheus service. // Ensure this matches the labels on your Prometheus service.
// Adjust as necessary if your service uses a different label.
matchLabels: { matchLabels: {
prometheus: 'prometheus-k8s', prometheus: 'prometheus-k8s',
}, },
@@ -157,10 +155,7 @@ local manifests =
endpoints: [{ endpoints: [{
port: 'web', port: 'web',
interval: '30s', interval: '30s',
scheme: 'https', scheme: 'http'
tlsConfig: {
insecureSkipVerify: true,
},
}], }],
}, },
} }

View File

@@ -46,6 +46,8 @@ spec:
fsGroup: 2000 fsGroup: 2000
runAsNonRoot: true runAsNonRoot: true
runAsUser: 1000 runAsUser: 1000
selfMonitor:
enabled: true
serviceAccountName: prometheus-k8s serviceAccountName: prometheus-k8s
serviceMonitorNamespaceSelector: {} serviceMonitorNamespaceSelector: {}
serviceMonitorSelector: {} serviceMonitorSelector: {}

View File

@@ -9,9 +9,7 @@ spec:
endpoints: endpoints:
- interval: 30s - interval: 30s
port: web port: web
scheme: https scheme: http
tlsConfig:
insecureSkipVerify: true
jobLabel: prometheus jobLabel: prometheus
selector: selector:
matchLabels: matchLabels: