Description of problem: As stated in the OpenShift enhancement proposal [1], a rule that has the "openshift.io/prometheus-rule-evaluation-scope: leaf-prometheus" label should be deployed on the user-workload monitoring Prometheus instances instead of Thanos ruler. Currently the rule is deployed on both. [1] https://github.com/openshift/enhancements/blob/master/enhancements/monitoring/user-workload-monitoring.md Version-Release number of selected component (if applicable): 4.6 but also exists for 4.5 How reproducible: Always Steps to Reproduce: 1. Enable user-workload monitoring 2. Create a namespace named "demo" 3. Deploy this simple rule apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: demo namespace: demo labels: app: demo openshift.io/prometheus-rule-evaluation-scope: leaf-prometheus spec: groups: - name: demo rules: - expr: vector(1) record: demo Actual results: The rule is deployed on prometheus-user-workload-* and thanos-ruler-user-workload-* instances. Expected results: The rule is deployed only on prometheus-user-workload-* instances. Additional info:
tested with 4.6.0-0.nightly-2020-08-04-193041, followed the steps in Comment 0, Rules with the "openshift.io/prometheus-rule-evaluation-scope: leaf-prometheus" label only deployed on prometheus-user-workload-* instances. # oc -n openshift-user-workload-monitoring exec -c rules-configmap-reloader thanos-ruler-user-workload-0 -- ls /etc/thanos/rules/thanos-ruler-user-workload-rulefiles-0 no result # oc -n openshift-user-workload-monitoring exec -c rules-configmap-reloader prometheus-user-workload-0 -- ls /etc/prometheus/rules/prometheus-user-workload-rulefiles-0 demo-demo.yaml
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:4196