Uses Kubernetes ConfigMaps to manage the remote configuration data by creating, loading, modifying, and saving the configuration data to and from a Kubernetes cluster.

Constructors

Accessors

Methods

  • Builds a task for creating a new remote configuration, intended for use with Listr task management. Merges cluster mappings from the provided context into the local configuration, then creates the remote config.

    Parameters

    • cluster: string
    • context: string
    • namespace: string

    Returns SoloListrTask<ListrContext>

    a Listr task which creates the remote configuration.

  • Retrieves the ConfigMap containing the remote configuration from the Kubernetes cluster.

    Returns Promise<V1ConfigMap>

    the remote configuration data.

    SoloError if the ConfigMap could not be read and the error is not a 404 status.

  • Performs the loading of the remote configuration. Checks if the configuration is already loaded, otherwise loads and adds the command to history.

    Parameters

    • argv: { _: string[] }

      arguments containing command input for historical reference.

    Returns Promise<void>

  • Modifies the loaded remote configuration data using a provided callback function. The callback operates on the configuration data, which is then saved to the cluster.

    Parameters

    • callback: (remoteConfig: RemoteConfigDataWrapper) => Promise<void>

      an async function that modifies the remote configuration data.

    Returns Promise<void>

    SoloError if the configuration is not loaded before modification.