Bug 1857229 - Rules with the "openshift.io/prometheus-rule-evaluation-scope: leaf-prometheus" label shouldn't be deployed on Thanos ruler
Summary: Rules with the "openshift.io/prometheus-rule-evaluation-scope: leaf-prometheu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.6.0
Assignee: Sergiusz Urbaniak
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-15 13:45 UTC by Simon Pasquier
Modified: 2020-10-27 16:15 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:14:43 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-monitoring-operator pull 888 0 None closed Bug 1857229: do not deploy leaf rules redundantly 2020-09-21 16:27:07 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:15:04 UTC

Description Simon Pasquier 2020-07-15 13:45:15 UTC
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:

Comment 5 Junqi Zhao 2020-08-05 06:17:36 UTC
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

Comment 7 errata-xmlrpc 2020-10-27 16:14:43 UTC
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


Note You need to log in before you can comment on or make changes to this bug.