Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeleteVolumeRequest:A parameter must be added to transfer the PV name of the volume to be deleted #558

Open
redriverhong opened this issue Dec 5, 2023 · 1 comment

Comments

@redriverhong
Copy link

Is your feature request related to a problem?/Why is this needed
Currently, the DeleteVolumeRequest is only one parameter VolumeId, which is used to transfer the volume to be deleted. However, this requirement cannot be met in the scenario where PV volumes are preset.
image

for example:
apiVersion: v1
kind: PersistentVolume
metadata:
annotations:
pv.kubernetes.io/provisioned-by: com.localcsi
pv.kubernetes.io/create-by: manual // Identifier Manually Preset
name: pv-test-0
spec:
capacity:
storage: 256Mi
accessModes:

  • ReadWriteOnce
    claimRef:
    apiVersion: v1
    kind: PersistentVolumeClaim
    name: data-test-0
    namespace: default
    persistentVolumeReclaimPolicy: Retain
    volumeMode: Filesystem
    storageClassName: local
    csi:
    driver: com.localcsi
    fsType: ext4
    volumeHandle: caasvg_lv // volumeId
    nodeAffinity:
    required:
    nodeSelectorTerms:
    • matchExpressions:
      • key: kubernetes.io/hostname
        operator: In
        values:
        • master1

apiVersion: v1
kind: PersistentVolume
metadata:
annotations:
pv.kubernetes.io/provisioned-by: com.localcsi
pv.kubernetes.io/create-by: manual // Identifier Manually Preset
name: pv-test-1
spec:
capacity:
storage: 256Mi
accessModes:

  • ReadWriteOnce
    claimRef:
    apiVersion: v1
    kind: PersistentVolumeClaim
    name: data-test-1
    namespace: default
    persistentVolumeReclaimPolicy: Retain
    volumeMode: Filesystem
    storageClassName: local
    csi:
    driver: com.localcsi
    fsType: ext4
    volumeHandle: caasvg_lv // volumeId
    nodeAffinity:
    required:
    nodeSelectorTerms:
    • matchExpressions:
      • key: kubernetes.io/hostname
        operator: In
        values:
        • master2

For the preceding two PVs, if I want to delete the first PV, only one volumeId is sent to me when I invoke the volume deletion interface. but the volumeId of the two PVs is the same and the volume of the node to be deleted cannot be identified.

So raised this issue to add a parameter pvName in DeleteVolumeRequest.

Describe the solution you'd like in detail
image

@jdef
Copy link
Member

jdef commented Dec 5, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants