Uploaded image for project: 'OpenShift Monitoring'
  1. OpenShift Monitoring
  2. MON-2974

Status of PVC in sts prometheus keep pending while the corresponding PV and PVC are bound

XMLWordPrintable

    • False
    • None
    • False
    • NEW
    • NEW
    • 0

      create monitoringstack then check PV, PVC and prometheus sts

      // code placeholder
      % oc -n openshift-observability-operator get monitoringstack sample-mon-stack -oyaml
      apiVersion: monitoring.rhobs/v1alpha1
      kind: MonitoringStack
      metadata:
        labels:
          mso: example
        name: sample-mon-stack
        namespace: openshift-observability-operator
      spec:
        alertmanagerConfig:
          disabled: false
        logLevel: debug
        prometheusConfig:
          persistentVolumeClaim:
            resources:
              requests:
                storage: 2Gi
            storageClassName: gp3-csi
            volumeMode: Filesystem
          replicas: 2
        resourceSelector:
          matchLabels:
            app: demo
        resources:
          limits:
            cpu: 500m
            memory: 512Mi
          requests:
            cpu: 100m
            memory: 256Mi
        retention: 1d
      
      % oc -n openshift-observability-operator get sts prometheus-sample-mon-stack -ojsonpath='{.spec.volumeClaimTemplates}'|jq
      [
        {
          "apiVersion": "v1",
          "kind": "PersistentVolumeClaim",
          "metadata": {
            "creationTimestamp": null,
            "name": "prometheus-sample-mon-stack-db"
          },
          "spec": {
            "accessModes": [
              "ReadWriteOnce"
            ],
            "resources": {
              "requests": {
                "storage": "2Gi"
              }
            },
            "storageClassName": "gp3-csi",
            "volumeMode": "Filesystem"
          },
          "status": {
            "phase": "Pending"
          }
        }
      ]
      
      % oc -n openshift-observability-operator get pvc                                                                         
      NAME                                                           STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
      prometheus-sample-mon-stack-db-prometheus-sample-mon-stack-0   Bound     pvc-0af31373-11c4-48ff-a4ed-11e4b493986b   2Gi        RWO            gp3-csi        15m
      prometheus-sample-mon-stack-db-prometheus-sample-mon-stack-1   Bound     pvc-8260645c-74e9-406a-8350-1f588c879abc   2Gi        RWO            gp3-csi        15m 
      
      % oc -n openshift-observability-operator get pv|grep mon 
      pvc-0af31373-11c4-48ff-a4ed-11e4b493986b   2Gi        RWO            Delete           Bound    openshift-observability-operator/prometheus-sample-mon-stack-db-prometheus-sample-mon-stack-0   gp3-csi                 15m
      pvc-8260645c-74e9-406a-8350-1f588c879abc   2Gi        RWO            Delete           Bound    openshift-observability-operator/prometheus-sample-mon-stack-db-prometheus-sample-mon-stack-1   gp3-csi                 15m

       

       

            spasquie@redhat.com Simon Pasquier
            hongyli@redhat.com Hongyan Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: