# Topology constraints example:
#
# Let's have two Manila AZs: manila-zone-1, manila-zone-2
# Let's have six Nova AZs: nova-{1..6}
#
# manila-zone-1 is accessible from nodes in nova-{1,2,3} only
# manila-zone-2 is accessible from nodes in nova-{4,5,6} only
#
# We're provisioning into manila-zone-1
# allowedTopologies reflects the topology constraints

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: csi-manila-nfs-az
provisioner: nfs.manila.csi.openstack.org
parameters:
  type: default
  availability: manila-zone-1
  
  csi.storage.k8s.io/provisioner-secret-name: csi-manila-secrets
  csi.storage.k8s.io/provisioner-secret-namespace: default
  csi.storage.k8s.io/node-stage-secret-name: csi-manila-secrets
  csi.storage.k8s.io/node-stage-secret-namespace: default
  csi.storage.k8s.io/node-publish-secret-name: csi-manila-secrets
  csi.storage.k8s.io/node-publish-secret-namespace: default
allowedTopologies:
  - matchLabelExpressions:
    - key: topology.manila.csi.openstack.org/zone
      values:
        - nova-1
        - nova-2
        - nova-3
    # ...or you may use other node labels:
    # - key: my-zone-label
    #   values:
    #     - nodes-that-can-reach-manila-az-1
