Skip to content

Volume provisioning with multiple storage backends #417

Open
@lechugaletal

Description

@lechugaletal

I'm trying to find if there is a way to provision PVs from multiple storage backends given a StatefulSet that has a single StorageClass defined in its volumeClaimTemplates section.

Given a StatefulSet with a spec of spec.volumeClaimTemplates.storageClassName: test-sc (pointing to a single StorageClass), and a storageClass with an hypothetical spec like:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: test-sc
parameters:
  backends:
    - accessProtocol: fc1
      csi.storage.k8s.io/controller-expand-secret-name: hpe-backend1
      csi.storage.k8s.io/controller-expand-secret-namespace: hpe-storage
      csi.storage.k8s.io/fstype: ext4
    - accessProtocol: fc2
      csi.storage.k8s.io/controller-expand-secret-name: hpe-backend2
      csi.storage.k8s.io/controller-expand-secret-namespace: hpe-storage
      csi.storage.k8s.io/fstype: ext4
      imageFeatures: layering
      pool: rbd
provisioner: csi.hpe.com
reclaimPolicy: Retain
volumeBindingMode: WaitForFirstConsumer
allowedTopologies:
- matchLabelExpressions:
  - key: csi.hpe.com/zone
    values:
    - fc1
    - fc2

Could it be possible to provision PVs from one backend or another depending on the zone or region in which the pod is scheduled?

Thank you very much for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions