Bug 1899839 - thanosRuler.resources.requests does not take effect in user-workload-monitoring-config confimap
Summary: thanosRuler.resources.requests does not take effect in user-workload-monitori...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.7.0
Assignee: Lili Cosic
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks: 1912430
TreeView+ depends on / blocked
 
Reported: 2020-11-20 08:00 UTC by Junqi Zhao
Modified: 2021-02-24 15:35 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1912430 (view as bug list)
Environment:
Last Closed: 2021-02-24 15:35:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
thanos-ruler-user-workload statefulset file (15.54 KB, text/plain)
2020-11-20 08:00 UTC, Junqi Zhao
no flags Details
thanos-ruler-user-workload statefulset file (15.67 KB, text/plain)
2020-11-20 08:07 UTC, Junqi Zhao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-monitoring-operator pull 1023 0 None closed Bug 1899839: jsonnet/thanos-ruler.jsonnet: Set resources to the native spec field 2021-01-19 05:55:18 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:35:31 UTC

Description Junqi Zhao 2020-11-20 08:00:28 UTC
Created attachment 1731165 [details]
thanos-ruler-user-workload statefulset file

Description of problem:
4.6.0-0.nightly-2020-11-18-154058, enable UserWorkload
*******************************
apiVersion: v1
kind: ConfigMap
metadata:
  name: cluster-monitoring-config
  namespace: openshift-monitoring
data:
  config.yaml: |
    enableUserWorkload: true
*******************************
and set resources.requests for thanosRuler in user-workload-monitoring-config confimap
*******************************
apiVersion: v1
kind: ConfigMap
metadata:
  name: user-workload-monitoring-config
  namespace: openshift-user-workload-monitoring
data:
  config.yaml: |
    prometheus:
      enforcedSampleLimit: 2
    thanosRuler:
      resources:
        requests:
          cpu: 20m
          memory: 50Mi
*******************************
prometheus.enforcedSampleLimit take effect
# oc -n openshift-user-workload-monitoring get prometheus user-workload -oyaml | grep enforcedSampleLimit
  enforcedSampleLimit: 2

but thanosRuler.resources.requests does not take effect, [cpu:1m memory:21Mi]], should be as the setting
# for i in thanos-ruler-user-workload-0 thanos-ruler-user-workload-1; do echo $i; kubectl -n openshift-user-workload-monitoring  get pod $i -o go-template='{{range.spec.containers}}{{"Container Name: "}}{{.name}}{{"\r\nresources: "}}{{.resources}}{{"\n"}}{{end}}'; echo -e "\n"; done
thanos-ruler-user-workload-0
Container Name: thanos-ruler
resources: map[requests:map[cpu:1m memory:21Mi]]
Container Name: config-reloader
resources: map[requests:map[cpu:1m memory:10Mi]]
Container Name: thanos-ruler-proxy
resources: map[requests:map[cpu:1m memory:12Mi]]


thanos-ruler-user-workload-1

Container Name: thanos-ruler
resources: map[requests:map[cpu:1m memory:21Mi]]
Container Name: config-reloader
resources: map[requests:map[cpu:1m memory:10Mi]]
Container Name: thanos-ruler-proxy
resources: map[requests:map[cpu:1m memory:12Mi]]

Version-Release number of selected component (if applicable):
4.6.0-0.nightly-2020-11-18-154058

How reproducible:
always

Steps to Reproduce:
1. see the description
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Junqi Zhao 2020-11-20 08:07:50 UTC
Created attachment 1731167 [details]
thanos-ruler-user-workload statefulset file

Comment 2 Junqi Zhao 2020-11-20 08:09:06 UTC
same issue with 4.7.0-0.nightly-2020-11-18-203317

Comment 7 Junqi Zhao 2020-12-21 01:39:24 UTC
tested with 4.7.0-0.nightly-2020-12-20-031835, and followed steps in Comment 0, issue is fixed
# for i in thanos-ruler-user-workload-0 thanos-ruler-user-workload-1; do echo $i; kubectl -n openshift-user-workload-monitoring  get pod $i -o go-template='{{range.spec.containers}}{{"Container Name: "}}{{.name}}{{"\r\nresources: "}}{{.resources}}{{"\n"}}{{end}}'; echo -e "\n"; done
thanos-ruler-user-workload-0
Container Name: thanos-ruler
resources: map[requests:map[cpu:20m memory:50Mi]]
Container Name: config-reloader
resources: map[requests:map[cpu:1m memory:10Mi]]
Container Name: thanos-ruler-proxy
resources: map[requests:map[cpu:1m memory:12Mi]]


thanos-ruler-user-workload-1
Container Name: thanos-ruler
resources: map[requests:map[cpu:20m memory:50Mi]]
Container Name: config-reloader
resources: map[requests:map[cpu:1m memory:10Mi]]
Container Name: thanos-ruler-proxy
resources: map[requests:map[cpu:1m memory:12Mi]]

Comment 10 errata-xmlrpc 2021-02-24 15:35:02 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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), 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/RHSA-2020:5633


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