Third‑Party Storage Capability Annotation Guide

Feature Overview: By adding a StorageDescription ConfigMap in the kube-public namespace, the platform automatically detects each third‑party StorageClass's snapshot support as well as supported volume modes and access modes (including block‑specific access modes). The PVC creation screen will then display only the valid options, helping you choose and use the right storage features with ease.

TOC

1. Getting Started

1.1 Create or Update the ConfigMap

Important: Perform the following operation in the kube-public namespace, otherwise the platform will not recognize the storage capabilities.

Edit or create a ConfigMap whose name starts with sd-, for example sd-capabilities-enhanced:

kubectl -n kube-public edit configmap sd-capabilities-enhanced

Required label

metadata:
  labels:
    features.alauda.io/type: StorageDescription

1.2 Populate the data field

Each key corresponds to a StorageClass provisioner; the value is a YAML string that describes its capabilities. Key fields:

FieldTypeDescription
snapshotBooleanIndicates whether volume snapshots are supported
volumeModeList[String]Supported volume modes; at least one of Filesystem, Block
accessModesList[String]Access modes available when volumeMode is Filesystem
blockAccessModesList[String]Access modes specific to Block volumes (optional)

If blockAccessModes is omitted, the platform will fall back to accessModes for Block volumes.

1.3 Apply the configuration

kubectl apply -f sd-capabilities-enhanced.yaml

Once applied, the UI automatically adjusts available options, for example:

  • When Block volume mode is selected, the access‑mode dropdown is populated with blockAccessModes.
  • If snapshot: true, snapshot‑related operations become available on the PVC page.

2. Sample ConfigMap

apiVersion: v1
kind: ConfigMap
metadata:
  name: sd-capabilities-enhanced
  namespace: kube-public
  labels:
    features.alauda.io/type: StorageDescription
data:
  storage.advanced-block-fs.com: |-
    snapshot: true
    volumeMode:
      - Filesystem
      - Block
    accessModes:
      - ReadWriteOnce
      - ReadOnlyMany
    blockAccessModes:
      - ReadWriteOnce
  storage.filesystem-basic.com: |-
    snapshot: false
    volumeMode:
      - Filesystem
    accessModes:
      - ReadWriteOnce
      - ReadWriteMany

3. Update Existing Capability Descriptions

  1. Locate the provisioner key you want to modify.
  2. Adjust the field values to reflect the actual capabilities.
  3. Re‑apply the ConfigMap with kubectl apply -f .... The platform polls for updates and refreshes the UI automatically; you can also refresh the browser to see the changes immediately.

4. Compatibility with the Legacy Format

  • If blockAccessModes is missing, Block volumes will inherit accessModes.
  • You do not need to delete old ConfigMaps; simply add the new fields for a smooth upgrade.

5. Frequently Asked Questions

SymptomPossible CauseResolution
Access‑mode list empty for Block volumesblockAccessModes is empty and accessModes is also emptyProvide at least one of the two
UI still shows outdated capabilitiesConfigMap not saved or browser cacheVerify with kubectl get cm, reload