Trying to figure out matchlabels for application-monitoring?

This commit is contained in:
Adam Saleh 2021-03-17 00:31:50 +01:00
parent 110786d513
commit 283d8a9dd3
3 changed files with 9 additions and 3 deletions

View file

@ -19,7 +19,10 @@
post_tasks:
- name: Apply node labels
command: oc label --overwrite namespace application-monitoring monitoring-key=middleware
command: oc label --overwrite namespace application-monitoring monitoring-key=cpe
- name: Apply node labels for bodhi POC
command: oc label --overwrite namespace bodhi monitoring-key=cpe
- name: Copy files
copy: src={{roles_path}}/openshift-apps/application-monitoring/files/ dest=/etc/openshift_apps/application-monitoring/

View file

@ -7,9 +7,12 @@ metadata:
spec:
replicas: 2
serviceAccountName: prometheus
serviceMonitorNamespaceSelector:
matchLabels:
monitoring-key: cpe
serviceMonitorSelector:
matchLabels:
team: frontend
monitoring-key: cpe
alerting:
alertmanagers:
- namespace: application-monitoring

View file

@ -2,7 +2,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
monitoring-key: 'middleware'
monitoring-key: 'cpe'
name: bodhi-web
spec:
endpoints: