Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-33950

Resources and Pod count gets doubled in OpenShift WebConsole when __replica__ is set to $(POD_NAME) and added as external label in cluster-monitoring-config cm.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.12.z, 4.11.z, 4.10.z
    • Observability UI
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • 5
    • None
    • No
    • None
    • None
    • None
    • Sprint 280
    • 1
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Issue: Resources and Pod count gets doubled in OpenShift WebConsole when {}replica{} is set to $(POD_NAME) and added as external label in cluster-monitoring-config cm.

      Steps to reproduce:

      1) OpenShift WebConsole > Compute > Nodes (Take screenshot)

      2) Create cluster-monitoring-config cm in openshift-monitoring 

      apiVersion: v1
      kind: ConfigMap
      metadata:
        name: cluster-monitoring-config
        namespace: openshift-monitoring
      data:
        config.yaml: |
          prometheusK8s:
            externalLabels:
               __replica__: $(POD_NAME) 

      https://docs.openshift.com/container-platform/4.10/monitoring/configuring-the-monitoring-stack.html#attaching-additional-labels-to-your-time-series-and-alerts_configuring-the-monitoring-stack

       3) OpenShift WebConsole > Compute > Nodes ---> check pod count and resources --> 2x values are found

      4) With API 2x values are not seen

      oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- curl -s --data-urlencode "query=sum by (instance) (node_memory_MemTotal_bytes)" 'http://localhost:9090/api/v1/query?'  

      More info:

      Git link : https://github.com/openshift/console/blob/4c6249f47bc61c8b8e5dfc52a555dc108a9ed079/frontend/packages/console-app/src/components/nodes/NodesPage.tsx#L416-L447

              jezhu@redhat.com Jenny Zhu
              jhadvig@redhat.com Jakub Hadvig
              None
              None
              YaDan Pei YaDan Pei
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: