Skip to content

Commit 03cb9b9

Browse files
authored
fix(aks): Add label for the job (#2665)
Currently, the metrics will have the job `kube-prometheus-stack-coredns` which does not integrate nicely with other alerts such as Pyrra. This renames the service and changes the job label. Breaking change though.
1 parent 2d4ef8e commit 03cb9b9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

jsonnet/kube-prometheus/platforms/aks.libsonnet

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@
1616
apiVersion: 'v1',
1717
kind: 'Service',
1818
metadata: {
19-
name: 'kube-prometheus-stack-coredns',
19+
name: 'kube-dns-metrics',
2020
namespace: 'kube-system',
21-
labels: { 'k8s-app': 'kube-dns' },
21+
labels: {
22+
'k8s-app': 'kube-dns',
23+
// This label is used as the job name in Prometheus
24+
'app.kubernetes.io/name': 'kube-dns',
25+
},
2226
},
2327
spec: {
2428
ports: [

0 commit comments

Comments
 (0)