Merge pull request #956 from PaytmLabs/feature/prometheus/unique-servicemonitor

Ensure Prometheus ServiceMonitor is unique
This commit is contained in:
Paweł Krupa
2021-02-22 08:39:47 +01:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -282,7 +282,7 @@ function(params) {
apiVersion: 'monitoring.coreos.com/v1', apiVersion: 'monitoring.coreos.com/v1',
kind: 'ServiceMonitor', kind: 'ServiceMonitor',
metadata: { metadata: {
name: 'prometheus', name: 'prometheus-' + p.config.name,
namespace: p.config.namespace, namespace: p.config.namespace,
labels: p.config.commonLabels, labels: p.config.commonLabels,
}, },

View File

@@ -6,7 +6,7 @@ metadata:
app.kubernetes.io/name: prometheus app.kubernetes.io/name: prometheus
app.kubernetes.io/part-of: kube-prometheus app.kubernetes.io/part-of: kube-prometheus
app.kubernetes.io/version: 2.24.0 app.kubernetes.io/version: 2.24.0
name: prometheus name: prometheus-k8s
namespace: monitoring namespace: monitoring
spec: spec:
endpoints: endpoints: