Description of problem:
As stated in the OpenShift enhancement proposal , 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.
Version-Release number of selected component (if applicable):
4.6 but also exists for 4.5
Steps to Reproduce:
1. Enable user-workload monitoring
2. Create a namespace named "demo"
3. Deploy this simple rule
- name: demo
- expr: vector(1)
The rule is deployed on prometheus-user-workload-* and thanos-ruler-user-workload-* instances.
The rule is deployed only on prometheus-user-workload-* instances.
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
# oc -n openshift-user-workload-monitoring exec -c rules-configmap-reloader prometheus-user-workload-0 -- ls /etc/prometheus/rules/prometheus-user-workload-rulefiles-0
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.