Bug 1939412 - missed labels for thanos-ruler pods
Summary: missed labels for thanos-ruler pods
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.8
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.8.0
Assignee: Pawel Krupa
QA Contact: hongyan li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-16 11:22 UTC by Junqi Zhao
Modified: 2021-07-27 22:54 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-27 22:53:48 UTC
Target Upstream Version:
Embargoed:
spasquie: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift prometheus-operator pull 114 0 None closed Bug 1939412: update to 0.47 2021-04-29 08:27:38 UTC
Github openshift prometheus-operator pull 116 0 None closed Revert "Bug 1939412: update to 0.47" 2021-04-29 08:27:39 UTC
Github openshift prometheus-operator pull 120 0 None open Bug 1939412: Bump to 0.47.1 2021-05-05 09:58:55 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 22:54:05 UTC

Description Junqi Zhao 2021-03-16 11:22:21 UTC
Description of problem:
enable user workload and check pods' labels
# oc -n openshift-user-workload-monitoring get pod --show-labels
NAME                                   READY   STATUS    RESTARTS   AGE   LABELS
prometheus-operator-59564d65c5-4gmm6   2/2     Running   0          19m   app.kubernetes.io/component=controller,app.kubernetes.io/managed-by=cluster-monitoring-operator,app.kubernetes.io/name=prometheus-operator,app.kubernetes.io/part-of=openshift-monitoring,app.kubernetes.io/version=0.45.0,pod-template-hash=59564d65c5
prometheus-user-workload-0             5/5     Running   1          19m   app.kubernetes.io/component=prometheus,app.kubernetes.io/managed-by=cluster-monitoring-operator,app.kubernetes.io/name=prometheus,app.kubernetes.io/part-of=openshift-monitoring,app.kubernetes.io/version=2.24.0,app=prometheus,controller-revision-hash=prometheus-user-workload-5b6d4764ff,operator.prometheus.io/name=user-workload,operator.prometheus.io/shard=0,prometheus=user-workload,statefulset.kubernetes.io/pod-name=prometheus-user-workload-0
prometheus-user-workload-1             5/5     Running   1          19m   app.kubernetes.io/component=prometheus,app.kubernetes.io/managed-by=cluster-monitoring-operator,app.kubernetes.io/name=prometheus,app.kubernetes.io/part-of=openshift-monitoring,app.kubernetes.io/version=2.24.0,app=prometheus,controller-revision-hash=prometheus-user-workload-5b6d4764ff,operator.prometheus.io/name=user-workload,operator.prometheus.io/shard=0,prometheus=user-workload,statefulset.kubernetes.io/pod-name=prometheus-user-workload-1
thanos-ruler-user-workload-0           3/3     Running   0          19m   app=thanos-ruler,controller-revision-hash=thanos-ruler-user-workload-f8f8f9f54,statefulset.kubernetes.io/pod-name=thanos-ruler-user-workload-0,thanos-ruler=user-workload
thanos-ruler-user-workload-1           3/3     Running   0          19m   app=thanos-ruler,controller-revision-hash=thanos-ruler-user-workload-f8f8f9f54,statefulset.kubernetes.io/pod-name=thanos-ruler-user-workload-1,thanos-ruler=user-workload
*************************
no following labels for thanos-ruler pod
kubernetes.io/component
app.kubernetes.io/managed-by
app.kubernetes.io/name
app.kubernetes.io/part-of
app.kubernetes.io/version

and did not find labels change for thanos-ruler deployment in
https://github.com/openshift/cluster-monitoring-operator/pull/1044/files

Version-Release number of selected component (if applicable):
4.8.0-0.nightly-2021-03-15-144314

How reproducible:
always

Steps to Reproduce:
1. enable user workload and check pods' labels
2.
3.

Actual results:


Expected results:


Additional info:
if it is by design, we could close it

Comment 1 SriKrishna 2021-04-22 07:18:14 UTC
For UWM stack components (which are private to users spinning up user workloads) would not need shared label prefixes like 'kubernetes.io' 'app.kubernetes.io'. 

@

Comment 2 hongyan li 2021-04-22 08:00:42 UTC

(In reply to SriKrishna from comment #1)
> For UWM stack components (which are private to users spinning up user
> workloads) would not need shared label prefixes like 'kubernetes.io'
> 'app.kubernetes.io'. 
> 
> @

Why other pods under openshift-user-workload-monitoring have those labels?

Comment 3 Sergiusz Urbaniak 2021-04-23 07:19:12 UTC
assets deployed in the context of user workload monitoring (prometheus, thanos ruler, etc.) are not modifiable by the user, hence they should get the aforementioned labels.

Comment 11 hongyan li 2021-05-07 01:42:59 UTC
Test with payload 4.8.0-0.nightly-2021-05-06-162549

oc -n openshift-user-workload-monitoring get pod --show-labels
NAME                                   READY   STATUS    RESTARTS   AGE   LABELS
prometheus-user-workload-0             5/5     Running   1          26s   app.kubernetes.io/component=prometheus,app.kubernetes.io/instance=user-workload,app.kubernetes.io/managed-by=prometheus-operator,app.kubernetes.io/name=prometheus,app.kubernetes.io/part-of=openshift-monitoring,app.kubernetes.io/version=2.26.0,app=prometheus,controller-revision-hash=prometheus-user-workload-684dc4bc,operator.prometheus.io/name=user-workload,operator.prometheus.io/shard=0,prometheus=user-workload,statefulset.kubernetes.io/pod-name=prometheus-user-workload-0
prometheus-user-workload-1             5/5     Running   1          26s   app.kubernetes.io/component=prometheus,app.kubernetes.io/instance=user-workload,app.kubernetes.io/managed-by=prometheus-operator,app.kubernetes.io/name=prometheus,app.kubernetes.io/part-of=openshift-monitoring,app.kubernetes.io/version=2.26.0,app=prometheus,controller-revision-hash=prometheus-user-workload-684dc4bc,operator.prometheus.io/name=user-workload,operator.prometheus.io/shard=0,prometheus=user-workload,statefulset.kubernetes.io/pod-name=prometheus-user-workload-1

thanos-ruler-user-workload-0           3/3     Running   0          21s   app.kubernetes.io/instance=user-workload,app.kubernetes.io/managed-by=prometheus-operator,app.kubernetes.io/name=thanos-ruler,app=thanos-ruler,controller-revision-hash=thanos-ruler-user-workload-54969c8d7d,statefulset.kubernetes.io/pod-name=thanos-ruler-user-workload-0,thanos-ruler=user-workload
thanos-ruler-user-workload-1           3/3     Running   0          21s   app.kubernetes.io/instance=user-workload,app.kubernetes.io/managed-by=prometheus-operator,app.kubernetes.io/name=thanos-ruler,app=thanos-ruler,controller-revision-hash=thanos-ruler-user-workload-54969c8d7d,statefulset.kubernetes.io/pod-name=thanos-ruler-user-workload-1,thanos-ruler=user-workload

thanos-ruler pods are still missing the following labels
app.kubernetes.io/component
app.kubernetes.io/part-of
app.kubernetes.io/version

Comment 12 hongyan li 2021-05-07 08:40:37 UTC
Confirmed with Dev, can skip those 3. The most important ones were managed-by and name which have been added, change the bug as verified.

https://coreos.slack.com/archives/G79AW9Q7R/p1620375313047900

Comment 15 errata-xmlrpc 2021-07-27 22:53:48 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.8.2 bug fix and security 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-2021:2438


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