Options
All
  • Public
  • Public/Protected
  • All
Menu

kpt-functions

Index

Type aliases

Json

Json: null | boolean | number | string | JsonArray | JsonMap

Any plain old JSON value according to ECMA-404.

Severity

Severity: "error" | "warn" | "info"

Severity of a configuration result.

Variables

ANNOTATION_PREFIX

ANNOTATION_PREFIX: "internal.config.kubernetes.io" = 'internal.config.kubernetes.io'

ID_ANNOTATION

ID_ANNOTATION: string = ...

LEGACY_ANNOTATION_PREFIX

LEGACY_ANNOTATION_PREFIX: "config.kubernetes.io" = 'config.kubernetes.io'

LEGACY_ID_ANNOTATION

LEGACY_ID_ANNOTATION: "config.k8s.io/id" = ...

LEGACY_SOURCE_INDEX_ANNOTATION

LEGACY_SOURCE_INDEX_ANNOTATION: string = ...

LEGACY_SOURCE_PATH_ANNOTATION

LEGACY_SOURCE_PATH_ANNOTATION: string = ...

SOURCE_INDEX_ANNOTATION

SOURCE_INDEX_ANNOTATION: string = ...

SOURCE_PATH_ANNOTATION

SOURCE_PATH_ANNOTATION: string = ...

Functions

addAnnotation

  • Add an annotation to a KubernetesObject's metadata. Overwrites the previously existing annotation if it exists. Return the resulting object.

    Parameters

    • o: KubernetesObject

      The object to add the annotation to.

    • annotation: string

      The annotation to set.

    • value: string

      The value to set the annotation to.

    Returns KubernetesObject

addLabel

  • Add a label to a KubernetesObject's metadata. Overwrites the previously existing label if it exists. Return the resulting object.

    Parameters

    • o: KubernetesObject

      The object to add the label to.

    • label: string

      The label to set.

    • value: string

      The value to set the label to.

    Returns KubernetesObject

configFileResult

  • configFileResult(message: string, path: string, severity?: Severity, tags?: {}): Result
  • A result relating to a configuration file.

    Parameters

    • message: string
    • path: string
    • severity: Severity = 'error'
    • Optional tags: {}
      • [key: string]: string

    Returns Result

generalResult

  • generalResult(message: string, severity?: Severity, tags?: {}): Result

getAnnotation

  • Get the value of the object's annotation, or undefined if it is not set.

    Parameters

    • o: KubernetesObject

      The object to get the annotation from.

    • annotation: string

      The annotation to get.

    Returns string | undefined

getLabel

  • Get the value of the object's label, or undefined if it is not set.

    Parameters

    • o: KubernetesObject

      The object to get the label from.

    • label: string

      The label to get.

    Returns string | undefined

isKubernetesObject

kubernetesKey

  • A unique key for a Kubernetes object defined as tuple of (apiVersion, kind, namespace, name).

    Parameters

    Returns string

kubernetesObjectResult

removeAnnotation

  • Remove an annotation from a KubernetesObject's metadata. If the resulting metadata.annotations is empty, removes it. Return the resulting object.

    Parameters

    • o: KubernetesObject

      The object to remove the annotation from.

    • annotation: string

      The annotation to remove.

    Returns KubernetesObject

removeLabel

  • Remove a label from a KubernetesObject's metadata. If the resulting metadata.labels is empty, removes it. Return the resulting object.

    Parameters

    • o: KubernetesObject

      The object to remove the label from.

    • label: string

      The label to remove.

    Returns KubernetesObject

run

  • This is the main entrypoint for running a kpt function.

    This method does not throw any errors and can be invoked at the top-level without getting an unhandled promise rejection error.

    Parameters

    Returns Promise<void>

runFnWithConfigs

Generated using TypeDoc