Bug 1793328

Summary: Set PVC names for prometheus and alertmanager, the created PVCs don't take the values set for them
Product: OpenShift Container Platform Reporter: Junqi Zhao <juzhao>
Component: MonitoringAssignee: Lili Cosic <lcosic>
Status: CLOSED DUPLICATE QA Contact: Junqi Zhao <juzhao>
Severity: low Docs Contact:
Priority: medium    
Version: 4.4CC: alegrand, anpicker, erooth, kakkoyun, lcosic, mloibl, pkrupa, spasquie, surbania
Target Milestone: ---Keywords: Regression
Target Release: 4.5.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-05-15 04:35:38 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 Junqi Zhao 2020-01-21 06:58:16 UTC
Description of problem:
Set PVC name for prometheus and alertmanager, the created PVCs don't take the values set for them
#  oc -n openshift-monitoring get cm cluster-monitoring-config -oyaml
apiVersion: v1
data:
  config.yaml: |
    prometheusK8s:
      volumeClaimTemplate:
        metadata:
          name: prometheus-claim-sasha1
        spec:
          storageClassName: gp2
          resources:
            requests:
              storage: 2Gi
    alertmanagerMain:
      volumeClaimTemplate:
        metadata:
          name: alertmanager-claim-sasha1
        spec:
          storageClassName: gp2
          resources:
            requests:
              storage: 3Gi
kind: ConfigMap
metadata:
  creationTimestamp: "2020-01-21T04:08:33Z"
  name: cluster-monitoring-config
  namespace: openshift-monitoring
  resourceVersion: "71499"
  selfLink: /api/v1/namespaces/openshift-monitoring/configmaps/cluster-monitoring-config
  uid: d6e31cc7-7d24-4032-83eb-8342ff050f51

# oc -n openshift-monitoring get  pvc 
NAME                                       STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
alertmanager-main-db-alertmanager-main-0   Bound    pvc-477e8030-371b-4153-afcb-63b5e6d90d3c   3Gi        RWO            gp2            30m
alertmanager-main-db-alertmanager-main-1   Bound    pvc-9b086a1f-5ec8-4852-9fb9-26e4d1306925   3Gi        RWO            gp2            30m
alertmanager-main-db-alertmanager-main-2   Bound    pvc-76b1f3bc-6125-45a1-b8cc-8817c305f8c4   3Gi        RWO            gp2            30m
prometheus-k8s-db-prometheus-k8s-0         Bound    pvc-0eac5d50-ccd4-430f-8a3f-139beb806615   2Gi        RWO            gp2            30m
prometheus-k8s-db-prometheus-k8s-1         Bound    pvc-834eccb4-7fc7-4ee5-99c4-bcab11c6a8c2   2Gi        RWO            gp2            30m

# oc -n openshift-monitoring get sts  prometheus-k8s -oyaml | grep volumeClaimTemplates -A3
  volumeClaimTemplates:
  - metadata:
      creationTimestamp: null
      name: prometheus-k8s-db

# oc -n openshift-monitoring get sts  alertmanager-main -oyaml | grep volumeClaimTemplates -A3
  volumeClaimTemplates:
  - metadata:
      creationTimestamp: null
      name: alertmanager-main-db


Version-Release number of selected component (if applicable):
4.4.0-0.nightly-2020-01-20-191154

How reproducible:
Always

Steps to Reproduce:
1. set PVC name for prometheus and alertmanager, then create PVs
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Junqi Zhao 2020-02-10 06:29:28 UTC
*** Bug 1798924 has been marked as a duplicate of this bug. ***

Comment 10 Junqi Zhao 2020-05-15 04:35:38 UTC

*** This bug has been marked as a duplicate of bug 1832124 ***