interface ConfigMaps {
    create(
        namespace: NamespaceName,
        name: string,
        labels: Record<string, string>,
        data: Record<string, string>,
    ): Promise<boolean>;
    createOrReplace(
        namespace: NamespaceName,
        name: string,
        labels: Record<string, string>,
        data: Record<string, string>,
    ): Promise<boolean>;
    delete(namespace: NamespaceName, name: string): Promise<boolean>;
    exists(namespace: NamespaceName, name: string): Promise<boolean>;
    list(namespace: NamespaceName, labels: string[]): Promise<V1ConfigMap[]>;
    listForAllNamespaces(labels: string[]): Promise<V1ConfigMap[]>;
    read(namespace: NamespaceName, name: string): Promise<V1ConfigMap>;
    replace(
        namespace: NamespaceName,
        name: string,
        labels: Record<string, string>,
        data: Record<string, string>,
    ): Promise<boolean>;
    update(
        namespace: NamespaceName,
        name: string,
        data: Record<string, string>,
    ): Promise<void>;
}

Implemented by

Methods

  • Create a new config map. If the config map already exists, it will not be replaced.

    Parameters

    • namespace: NamespaceName

      for the config map

    • name: string

      for the config name

    • labels: Record<string, string>

      for the config metadata

    • data: Record<string, string>

      to contain in the config

    Returns Promise<boolean>

    if the config map could not be created.

    if the API call fails for an unexpected reason.

  • Create or replace a config map. If the config map already exists, it will be replaced.

    Parameters

    • namespace: NamespaceName

      for the config map

    • name: string

      for the config name

    • labels: Record<string, string>

      for the config metadata

    • data: Record<string, string>

      to contain in the config

    Returns Promise<boolean>

    if the config map could not be created.

    if the config map could not be replaced.

    if the API call fails for an unexpected reason.

  • List all config maps in all namespaces for the given labels

    Parameters

    • labels: string[]

      for the config maps

    Returns Promise<V1ConfigMap[]>

    list of config maps

    SoloError if the list operation fails

  • Replace an existing config map with a new one

    Parameters

    • namespace: NamespaceName

      for the config map

    • name: string

      for the config name

    • labels: Record<string, string>

      for the config metadata

    • data: Record<string, string>

      to contain in the config

    Returns Promise<boolean>