Bug 1923984

Summary: Incorrect anti-affinity for UWM prometheus
Product: OpenShift Container Platform Reporter: Pawel Krupa <pkrupa>
Component: MonitoringAssignee: Pawel Krupa <pkrupa>
Status: CLOSED ERRATA QA Contact: hongyan li <hongyli>
Severity: medium Docs Contact:
Priority: low    
Version: 4.7CC: alegrand, anpicker, erooth, juzhao, kakkoyun, lcosic, mbukatov, pkrupa
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 22:37:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pawel Krupa 2021-02-02 11:24:19 UTC
Description of problem:
User Workload Prometheus has an incorrect pod anti-affinity rule. 

Bug was introduced in https://github.com/openshift/cluster-monitoring-operator/pull/1018

Version-Release number of selected component (if applicable):
4.7

How reproducible:
Always


Steps to Reproduce:
1. Start a cluster with UWM
2. Check UWM prometheus STS
3.

Actual results:
PodAntiAffinity section references the in-cluster prometheus

Expected results:
PodAntiAffinity section references the UWM prometheus and not in-cluster one

Additional info:

Comment 6 hongyan li 2021-03-15 01:48:11 UTC
Test with payload  4.8.0-0.nightly-2021-03-14-134919

# oc -n openshift-user-workload-monitoring get sts prometheus-user-workload -oyaml
--
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - podAffinityTerm:
              labelSelector:
                matchExpressions:
                - key: prometheus
                  operator: In
                  values:
                  - user-workload
              namespaces:
              - openshift-user-workload-monitoring

--

Comment 7 Martin Bukatovic 2021-03-15 09:04:48 UTC
*** Bug 1937466 has been marked as a duplicate of this bug. ***

Comment 10 errata-xmlrpc 2021-07-27 22:37:35 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