Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-4616

Dynamic CR List Page Columns based on additionalPrinterColumns

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • OCP Console - Sprint 274

      Building upon the PatternFly DataView integration, this story aims to enhance the CRD list page by making its columns configurable. Instead of a static set of columns, the console will now attempt to read the additionalPrinterColumns field from a CRD's spec to determine which columns to display for that specific CRD type, together with the default columns. If additionalPrinterColumns are not defined for a CRD, Console will fall back to the currently surfaced default columns.

      To address the scenario where end-users may not have direct RBAC permissions to fetch CRDs (which is necessary to read additionalPrinterColumns), a new Console proxy endpoint will be introduced in the backend. This proxy will fetch CRDs using the Console's elevated RBAC permissions. Correspondingly, the Console-operator's RBAC configuration will need to be updated to grant the Console the necessary permissions to perform these CRD fetches.

       

      AC:

      • The CRD list page (using DataView) dynamically renders columns based on the additionalPrinterColumns found in the CRD's spec together with the default columns. If a CRD does not define additionalPrinterColumns, the page defaults to displaying the default columns for that CRD.
      • Add integration tests for CRD with and without additionalPrinterColumns defined.

       

      Technical Notes:

      • Frontend:
        • Modify the data fetching logic for the CRD list page to call the new Console backend proxy for CRD definitions.
        • Parse the additionalPrinterColumns from the fetched CRD spec.
        • Adjust the DataView's column definition logic to dynamically generate columns based on this information, falling back to default column definitions if additionalPrinterColumns are absent.
        • Consider caching mechanisms for additionalPrinterColumns on the frontend to reduce repeated proxy calls for the same CRD types.

              rhn-engineering-rhamilto Robb Hamilton
              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:
                Resolved: