Home / Platform management / Storage / StorageClasses / Third-Party Storage Capability Tags

Third-Party Storage Capability Tags

With the increasing adoption of public and private cloud scenarios, the need for scenarios utilizing third-party storage is also growing. Providing tags for third-party storage allows users to better understand and utilize such storage.

Overview

When creating a storage class, the provisioner field is specified. The platform recognizes this field and looks for a ConfigMap in the specified namespace with the label features.alauda.io/type: StorageDescription. When a key matching the provisioner field is identified in the ConfigMap, the platform tags the corresponding supported storage capabilities to the storage class.

Procedure

  1. In the left navigation, click on Clusters > Resources.

  2. Switch to the global cluster.

  3. Click on Create Resource to add a new YAML configuration file.

    • Example YAML:

       apiVersion: v1
       data:
           storage.type1.com: |-
             type: Filesystem
             volumeMode:
             - Filesystem
             accessModes:
             - ReadWriteOnce
             - ReadWriteMany
             - ReadWriteOncePod       
           storage.type2.com: |-
             type: Filesystem
             snapshot: true
             volumeMode:
             - Filesystem
             - Block
             accessModes:
             - ReadWriteOnce
             - ReadOnlyMany
             - ReadWriteOncePod       
       kind: ConfigMap
       metadata:
           labels:
             features.alauda.io/type: StorageDescription
           name: sd-built-in
           namespace: kube-public
    • Field Descriptions:

      Field Description
      data Add one or more configuration items, where each item represents a description file for a type of storage.
      • Key: Corresponds to the provisioner of the storage class.
      • Value: YAML-formatted string describing the capabilities of the corresponding storage.

      Example: In the example above, the provisioner is configured as storage.type2.com, and it supports file storage with the ability to create snapshots, various volume modes, and multiple access modes. The key-value pair is as follows, and for specific field descriptions, refer to Supported Storage Capabilities .
      • Key: storage.type2.com
      • Value:
        type: Filesystem
        snapshot: true
        volumeMode:
        - Filesystem
        - Block
        accessModes:
        - ReadWriteOnce
        - ReadOnlyMany
        - ReadWriteOncePod
      metadata.labels Must include the label features.alauda.io/type = StorageDescription.
      metadata.name Must start with sd and follow the format sd-<name>, for example, sd-configmap1.
      metadata.namespace Specify the kube-public namespace.
    • Supported storage capabilities are as follows:

      Property Field Options Default Description
      Type type
      • Filesystem
      • Block
      - If this field is not configured or the configured type is not within the available options, the type will be displayed as unknown.
      Snapshot snapshot
      • true
      • false
      false If this field in the configuration dictionary is false or not within the available options, volume snapshots cannot be created via the form.
      Volume Mode volumeMode
      • Filesystem
      • Block
      Filesystem When selecting Block volume mode, persistent volume claims (PVCs) do not support mounting as directories.
      Access Modes accessModes
      • ReadWriteOnce
      • ReadOnlyMany
      • ReadWriteMany
      • ReadWriteOncePod
      -
      • If this field is not configured or the configured mode is not within the available options, no access modes can be selected via the form.
      • Selection of ReadWriteOncePod access mode via the form is not currently supported.
  4. Click Create.

Creating Persistent Volume Claims

If creating persistent volume claims using the form and the selected storage class has been tagged by a ConfigMap, unsupported storage capabilities in the ConfigMap cannot be selected.