interface Pvcs {
    create(
        pvcRef: PvcRef,
        labels: Record<string, string>,
        accessModes: string[],
    ): Promise<Pvc>;
    delete(pvcRef: PvcRef): Promise<boolean>;
    list(namespace: NamespaceName, labels?: string[]): Promise<string[]>;
}

Implemented by

Methods

  • Create a persistent volume claim

    Parameters

    • pvcRef: PvcRef

      the persistent volume claim reference

    • labels: Record<string, string>

      the labels to apply to the persistent volume claim

    • accessModes: string[]

      the access modes for the persistent volume claim

    Returns Promise<Pvc>

    the persistent volume claim

    if the persistent volume claim could not be created

  • Delete a persistent volume claim

    Parameters

    • pvcRef: PvcRef

      the persistent volume claim reference

    Returns Promise<boolean>

    true if the persistent volume claim was deleted

    if the persistent volume claim could not be deleted

  • Get a list of persistent volume claim names for the given namespace

    Parameters

    • namespace: NamespaceName

      the namespace of the persistent volume claims to return

    • Optionallabels: string[]

      labels

    Returns Promise<string[]>

    list of persistent volume claim names

    if the persistent volume claims could not be listed