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

[enterprise-4.14] Issue in file storage/container_storage_interface/persistent-storage-csi-sc-manage.adoc

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.13.z, 4.12.z, 4.11.z, 4.14.z
    • Informational
    • No
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required

      Description of problem:

      Users (developers) on an OCP cluster; may not know what 'storage is available' to them (or what the default's are). 

      xref: https://docs.openshift.com/container-platform/4.13/storage/container_storage_interface/persistent-storage-csi-sc-manage.html
      xref: https://docs.openshift.com/container-platform/4.13/storage/understanding-persistent-storage.html#persistent-volume-claims_understanding-persistent-storage 

      Expected results:

      We should explain to users how to lookup the storage classes that an admin has configured. `oc get storageclass` and how to lookup the default storage class (name) `oc get sc -o jsonpath='{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io\/is-default-class)].metadata.name}'`.

      Additional info:

      You can lookup the default storage lass by looking up the "storageclass.kubernetes.io/is-default-class": "true" annotation on the storage class object[s], which is (self contained) can be done with oc (and one its output formats); shown in the filing is `jsonpath`. 

      xref: https://kubernetes.io/docs/tasks/administer-cluster/change-default-storage-class/ 
      xref: https://kubernetes.io/docs/reference/kubectl/jsonpath/ 

      Its simpler to understand this jq parsing (but it requires 2 tools to achieve/produce): 

      oc get sc -o json | jq '.items[] | select (.metadata.annotations."storageclass.kubernetes.io/is-default-class")'

            lpettyjo@redhat.com Lisa Pettyjohn
            rhn-support-edrich Eric Rich
            Dave Mulford
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: