-
Notifications
You must be signed in to change notification settings - Fork 373
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
[feature request] provide VolumeContext in DeleteVolume, ControllerExpandVolume request #507
Comments
please no. we've discussed this all before, and it should be possible to delete a volume if CO loses its mind and vol metadata is lost. if vol ID is getting "longer and longer" then this suggests arch/design issues elsewhere (because non-identifying information is being stuffed into the ID field for convenience). |
@jdef we need secretNamespace in |
@andyzhangx maybe i misunderstand the use case. if you need secrets to delete a volume, doesn't DeleteVolumeRequest already offer that API? CSI doesn't know about k8s namespaces, nor should it. that said, if namespace is a reasonable (read: essential) coordinate for locating a volume in some storage backend, then it probably belongs in vol ID. |
@jdef actually external-provisioner would inject pvcNamespace now on |
DeleteVolume is expected to succeed without a volume context because it might be called as part of an emergency cleanup operation, when the CO has lost other relevant information and has only the volume ID. The alternative is that DeleteVolume might not get called at all, and resources could leak, in a scenario where the CO has lost data. The spec writers decided it was preferable to put the responsibility on the SP for retaining enough relevant knowledge so that it can delete a volume given nothing but the volume ID and delete secrets. |
@bswartz thanks for the clarification! |
VolumeContext
should also be inDeleteVolumeRequest
, currently we have to encoding all info as a volumeID, now the volumeID is longer and longer, that's really ugly design. if there isVolumeContext
inDeleteVolumeRequest
, we could injectvolume.Spec.ClaimRef.Namespace
in external-provisioner by providing flag--extra-delete-metadata
, similar to--extra-create-metadata
: https://github.com/kubernetes-csi/external-provisioner#recommended-optional-arguments.The text was updated successfully, but these errors were encountered: