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

[release 4.13] Gather Monitoring pods' Persistent Volumes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 4.13
    • Insights Operator
    • None
    • CCXDEV Sprint 86, CCXDEV Sprint 87, CCXDEV Sprint 88
    • 3
    • No
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Bug Fix
    • Done

    Description

      Description of problem:

      INSIGHTOCP-1048 is a rule to check if Monitoring pods are using the NFS storage, which is not recommended in OpenShift.
      
      Gathering Persistent Volumes for openshift-monitoring namespace.

      Version-Release number of selected component (if applicable):

       

      How reproducible:

       

      Steps to Reproduce:

      1. Check if the cluster contains already Persistent Volume Claims on openshift-monitoring namespace.
      2. If there is none, create this ConfigMap for cluster-monitoring-config. That will setup prometheus default PVCs.

      apiVersion: v1
      kind: ConfigMap
      metadata:
        name: cluster-monitoring-config
        namespace: openshift-monitoring
      data:
        config.yaml: |
          prometheusK8s:
            volumeClaimTemplate:
              spec:
                resources:
                  requests:
                    storage: 1Gi

      3. Run insights Operator.
      4. In the result archive, on folder path /config/persistentvolumes/, there should be a file for each one of the Persistent Volumes bound to the PVCs.
      5. Name of the file should match the PV name and contain the resource data.

      Actual results:

       

      Expected results:

      example of persistent volume file:
      {
          "metadata": {
              "name": "pvc-99ffaeb3-8ff8-4137-a1fc-0bf72e7209a5",
              "uid": "17122aab-411b-4a71-ae35-c13caac23492",
              "resourceVersion": "20098",
              "creationTimestamp": "2023-02-20T14:44:30Z",
              "labels": {
                  "topology.kubernetes.io/region": "us-west-2",
                  "topology.kubernetes.io/zone": "us-west-2c"
              },
              "annotations": {
                  "kubernetes.io/createdby": "aws-ebs-dynamic-provisioner",
                  "pv.kubernetes.io/bound-by-controller": "yes",
                  "pv.kubernetes.io/provisioned-by": "kubernetes.io/aws-ebs"
              },
              "finalizers": [
                  "kubernetes.io/pv-protection"
              ]
          },
          "spec": {
              "capacity": {
                  "storage": "20Gi"
              },
              "awsElasticBlockStore": {
                  "volumeID": "aws://us-west-2c/vol-07ecf570b7adfedda",
                  "fsType": "ext4"
              },
              "accessModes": [
                  "ReadWriteOnce"
              ],
              "claimRef": {
                  "kind": "PersistentVolumeClaim",
                  "namespace": "openshift-monitoring",
                  "name": "prometheus-data-prometheus-k8s-1",
                  "uid": "99ffaeb3-8ff8-4137-a1fc-0bf72e7209a5",
                  "apiVersion": "v1",
                  "resourceVersion": "19914"
              },
              "persistentVolumeReclaimPolicy": "Delete",
              "storageClassName": "gp2",
              "volumeMode": "Filesystem",
              "nodeAffinity": {
                  "required": {
                      "nodeSelectorTerms": [
                          {
                              "matchExpressions": [
                                  {
                                      "key": "topology.kubernetes.io/region",
                                      "operator": "In",
                                      "values": [
                                          "us-west-2"
                                      ]
                                  },
                                  {
                                      "key": "topology.kubernetes.io/zone",
                                      "operator": "In",
                                      "values": [
                                          "us-west-2c"
                                      ]
                                  }
                              ]
                          }
                      ]
                  }
              }
          },
          "status": {
              "phase": "Bound"
          }
      }

      Additional info:

       

      Attachments

        Issue Links

          Activity

            People

              rh-ee-ijimeno Isaac Jimeno
              rh-ee-ijimeno Isaac Jimeno
              Joao Bastos Fula Joao Bastos Fula
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: