kubernetes / cloud-provider-openstack

Apache License 2.0
623 stars 611 forks source link

[manila-csi-plugin] support muilple share rules #2725

Open moonek opened 1 week ago

moonek commented 1 week ago

Is this a BUG REPORT or FEATURE REQUEST?:

/kind feature

What happened:

Multiple share rules cannot be registered.

What you expected to happen:

I would like to register multiple share rules separated by commas as follows.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: csi-manila-nfs
provisioner: nfs.manila.csi.openstack.org
allowVolumeExpansion: true
parameters:
  # Manila share type
  type: default

  csi.storage.k8s.io/provisioner-secret-name: csi-manila-secrets
  csi.storage.k8s.io/provisioner-secret-namespace: default
  csi.storage.k8s.io/controller-expand-secret-name: csi-manila-secrets
  csi.storage.k8s.io/controller-expand-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
  nfs-shareClient: "10.1.10.0/24,10.2.20.0/24"

How to reproduce it:

Warning  ProvisioningFailed    3s (x6 over 53s)   manila.csi.openstack.org_openstack-manila-csi-controllerplugin-0_7699907b-feed-47cb-a5be-0dd45489522b  failed to provision volume with StorageClass "csi-manila-nfs": rpc error: code = Internal desc = failed to grant access to volume pvc-4cd02bad-b321-4aa0-85ba-64f451d1ac6b: Bad request with: [POST https://xxxxx/v2/8f21cfb9acbd4b9b91f3c39542bf68a4/shares/7617dbea-dca0-4412-afd8-cbaf36283cf0/action], error message: {"badRequest": {"code": 400, "message": "Only one '/' permitted in '10.1.10.0/24,10.2.20.0/24'"}}

Anything else we need to know?:

Environment: