Transforms plain orchestrator API objects to Polaris to instances of ApiObject or a subclass thereof, based on their object kinds.

PolarisTransformer info:

  • Inheritable: Yes
  • Reusable in other transformers: Yes
  • Handled orchestrator object properties:
    • apiVersion
    • kind
    • metadata
    • spec
  • Unknown property handling: Ignores unknown properties of the root ApiObject.

Type Parameters

  • T

  • P = any

Hierarchy

  • ApiObjectTransformer

Implements

Constructors

Methods

  • Transforms the specified orchestrator-specific plain object into the init data (plain data object) required by the constructor of the corresponding Polaris object.

    This method can be used by a transformer of a subclass U of T to delegate the extraction of the data required by T without instantiating T. The transformer of U can then add the data of its type before passing all the init data to the constructor of U.

    Parameters

    • polarisType: Constructor<ApiObject<T>>

      The type of Polaris object, for which the init data should be extracted.

    • orchPlainObj: KubernetesObjectWithSpec<P>

      The orchestrator-specific plain object to be transformed. This is guaranteed to be neither null nor undefined.

    • transformationService: PolarisTransformationService

      The PolarisTransformationService that issued this call. It can be used to delegate the transformation of nested objects.

    Returns Partial<ApiObject<T>>

    The init data for a Polaris object of type T that results from transforming orchPlainObj.

Generated using TypeDoc