Bug 1853279 - prometheus.hostport does not take effect for UWM prometheus-user-workload pod
Summary: prometheus.hostport does not take effect for UWM prometheus-user-workload pod
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.6.0
Assignee: Simon Pasquier
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-02 10:47 UTC by Junqi Zhao
Modified: 2020-10-27 16:12 UTC (History)
9 users (show)

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


Attachments (Terms of Use)
prometheus crd file (5.86 KB, text/plain)
2020-07-02 10:47 UTC, Junqi Zhao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-monitoring-operator pull 859 0 None closed pkg: remove 'hostport' configuration 2020-12-14 11:00:30 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:12:07 UTC

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


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