Uploaded image for project: 'OpenShift Cloud'
  1. OpenShift Cloud
  2. OCPCLOUD-2568

Design providerSpec to infra template conversion library

XMLWordPrintable

    • Icon: Spike Spike
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • CLOUD Sprint 251, CLOUD Sprint 252, CLOUD Sprint 253, CLOUD Sprint 254, CLOUD Sprint 255, CLOUD Sprint 256, CLOUD Sprint 257, CLOUD Sprint 258, CLOUD Sprint 259

      The core of the Machine API to Cluster API conversion will rely on a bi-directional conversion library that can convert providerSpecs from Machine API into InfraTemplates in Cluster API, and back again.

      We should aim to have a platform agnostic interface such that the core logic of the migration mechanism need not care about platforms specific detail.

      The library should also be able to return errors when conversion is not possible, which may occur when:

      • A feature in MAPI is not implemented in CAPI
      • A feature in CAPI is not implemented in MAPI
      • A value in MAPI, that now exists on the infrastructure cluster, is not compatible with the existing infrastructure cluster

      These errors should resemble the API validation errors from webhooks, for familiarity, using utils such as `field.NewPath` and the InvalidValue error types.

      We expect this logic to be used in the core sync controllers, responsible for converting Machine API resources to Cluster API resources and vice versa.

      DoD:

      • Flesh out a design for a code interface for the conversion of providerSpecs to InfraTemplates
      • Create an implementation of the interface that handles conversion for AWS providerSpecs
      • Implement testing for the conversion from MAPI to CAPI and vice versa, exercising fields that are known to convert well, as well as including error cases.
      • Commit the code into a package within the cluster-capi-operator repository, ready for use by the conversion controller core code

            ddonati@redhat.com Damiano Donati
            joelspeed Joel Speed
            Milind Yadav Milind Yadav
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: