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

Explore generation of K8sResource types

XMLWordPrintable

    • Icon: Spike Spike
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • None
    • OCP Console - Sprint 276

      We current store the schemas of each k8s resource we read in k8s/types.ts. This manual effort is cumbersome and error-prone, and is occasionally the cause of bugs.

      Projects already exist to generate TypeScript types for vanilla Kubernetes resources (see prior art: kubernetes-types, kubricate, kubernetes-models, kubernetesjs, pepr, crdtotypes, etc...)

      We should investigate generating this file, perhaps by reading the JSON schemas or by reading openshift/api. Furtermore, future work can allow extraction of these types into the OpenShift dynamic plugin SDK as a part of @openshift/dynamic-plugin-sdk/lib-utils.

       

      AC: A proof of concept exists which generates a type library containing a portion of our existing resource types from the OpenShift and/or Kubernetes API schemas.

              rh-ee-jaclee Jackson Lee
              rh-ee-jaclee Jackson Lee
              None
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: