Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1853279

Summary: prometheus.hostport does not take effect for UWM prometheus-user-workload pod
Product: OpenShift Container Platform Reporter: Junqi Zhao <juzhao>
Component: MonitoringAssignee: Simon Pasquier <spasquie>
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.6CC: alegrand, anpicker, erooth, kakkoyun, lcosic, mloibl, pkrupa, spasquie, surbania
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:11:47 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:
Attachments:
Description Flags
prometheus crd file none

Description Junqi Zhao 2020-07-02 10:47:02 UTC
Created attachment 1699615 [details]
prometheus crd file

Description of problem:
set "enableUserWorkload: true" to enable enableUserWorkload and create user-workload-monitoring-config ConfigMap to set prometheus.hostport and prometheus.remoteWrite, prometheus.remoteWrite takes effect, but prometheus.hostport does not
******************************
apiVersion: v1
kind: ConfigMap
metadata:
  name: cluster-monitoring-config
  namespace: openshift-monitoring
data:
  config.yaml: |
    enableUserWorkload: true
******************************
apiVersion: v1
kind: ConfigMap
metadata:
  name: user-workload-monitoring-config
  namespace: openshift-user-workload-monitoring
data:
  config.yaml: |
    prometheus:
      hostport: 9091
      remoteWrite:
      - url: "http://localhost:1234/receive"
******************************
prometheus.remoteWrite is found in prometheus crd, wheareas not for prometheus.hostport
# oc -n openshift-user-workload-monitoring get prometheus/user-workload -oyaml
...
  enforcedNamespaceLabel: namespace
  ignoreNamespaceSelectors: true
  image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:718b3ddd25d7207bc1867b57637caf7d64c842bde598cc91836a8c94f5cf9a8f
  listenLocal: true
  nodeSelector:
    kubernetes.io/os: linux
  overrideHonorLabels: true
  overrideHonorTimestamps: true
  podMonitorNamespaceSelector: {}
  podMonitorSelector: {}
  priorityClassName: system-cluster-critical
  remoteWrite:
  - url: http://localhost:1234/receive
  replicas: 2
  resources:
    requests:
      cpu: 100m
      memory: 1Gi
  retention: 15d
  ruleNamespaceSelector: {}
  ruleSelector:
    matchLabels:
      openshift.io/prometheus-rule-evaluation-scope: leaf-prometheus
  rules:
    alert: {}
...

Version-Release number of selected component (if applicable):
4.6.0-0.nightly-2020-06-30-020342

How reproducible:
always

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

Actual results:
prometheus.hostport does not work for UWM

Expected results:
should be like
...
        name: kube-rbac-proxy
        ports:
        - containerPort: 9100
          hostPort: 9100


Additional info:

Comment 1 Lili Cosic 2020-07-02 11:04:38 UTC
There is discussion that we will most likely remove this entirely from users. Will keep open until we do that.

Comment 2 Lili Cosic 2020-07-10 13:42:38 UTC
We have task for this to remove in the next sprint, so we can close once its removed.

Comment 3 Junqi Zhao 2020-07-10 14:26:49 UTC
(In reply to Lili Cosic from comment #2)
> We have task for this to remove in the next sprint, so we can close once its
> removed.

agree

Comment 8 Junqi Zhao 2020-07-22 11:42:03 UTC
tested with 4.6.0-0.nightly-2020-07-21-200036, hostport configuration is removed

Comment 10 errata-xmlrpc 2020-10-27 16:11:47 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