How to Annotate Third-Party Storage Capabilities

With the growing use of both public and private cloud environments, third-party storage integration has become increasingly important. This guide walks you through how to annotate third-party storage capabilities using a ConfigMap so your platform can recognize and surface those capabilities automatically.

Step 1: Open Storage Class Configuration

  1. Go to Platform Management in your platform’s UI.
  2. From the left sidebar, navigate to Storage Management > Storage Classes.
  3. Click Create Storage Class to start defining a new storage class.

Step 2: Fill in Storage Class Information

Provide the following details in the form:

FieldDescription
NameName of your new storage class.
Storage ClassSelect or define the storage class identifier.
ProvisionerEnter the provisioner name used by your storage plugin.

Step 3: Annotate Storage Capabilities with a ConfigMap

To enable capability annotations, create a ConfigMap in the kube-public namespace with the appropriate label and data format.

Example YAML:

apiVersion: v1
kind: ConfigMap
metadata:
  name: sd-built-in
  namespace: kube-public
  labels:
    features.alauda.io/type: StorageDescription
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

Key Points:

  • metadata.name: Must begin with sd-, e.g., sd-configmap1.
  • metadata.namespace: Must be kube-public.
  • metadata.labels: Include features.alauda.io/type = StorageDescription.
  • data:
    • Each key corresponds to the provisioner field in the storage class.
    • Each value is a YAML string describing the storage’s supported capabilities.

Step 4: Understand Supported Storage Capability Fields

Here are the supported fields you can define in the ConfigMap:

CapabilityFieldOptionsDefaultNotes
TypetypeFilesystem, BlockIf omitted or invalid, the type shows as unknown.
Snapshotsnapshottrue, falsefalseIf false or invalid, snapshot creation via the form UI is disabled.
Volume ModevolumeModeFilesystem, BlockFilesystemPVCs with Block mode don’t support directory mounts.
Access ModeaccessModesReadWriteOnce, ReadOnlyMany, ReadWriteMany, ReadWriteOncePodIf omitted or invalid, no access mode is selectable via the UI. ReadWriteOncePod isn't currently form-enabled.

Step 5: Finalize the Storage Class

Once the above details are set:

  1. Click Create to save your storage class.
  2. The platform will automatically match the provisioner with the ConfigMap and annotate the storage class with the defined capabilities.

Optional: Create a PVC Using the Annotated Storage Class

When you create a Persistent Volume Claim (PVC) via the form UI, only the supported capabilities from the annotated ConfigMap will be available. Unsupported options will not appear.