Transforms an ObjectKind between the Polaris format and a Kubernetes object of the form:

{
apiVersion: `${polarisObj.group}/${polarisObj.version}`,
kind: polarisObj.kind
}

PolarisTransformer info:

  • Inheritable: Yes
  • Reusable in other transformers: Yes
  • Handled orchestrator object properties:
    • apiVersion
    • kind
  • Unknown property handling: Copies unknown properties, because for Kubernetes the properties of most subclasses do not require transformation.

Hierarchy

  • ObjectKindTransformer

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<ObjectKind>

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

    • orchPlainObj: ApiVersionKind

      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<ObjectKind>

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

Generated using TypeDoc