rbd: healer detect Kubernetes version for right StagingTargetPath

Kubernetes 1.24 and newer use a different path for staging the volume.
That means the CSI-driver is requested to mount the volume at an other
location, compared to previous versions of Kubernetes. CSI-drivers
implementing the volumeHealer, must receive the correct path, otherwise
the after a nodeplugin restart the NBD mounts will bailout attempting
to NodeStageVolume() call and return an error.

See-also: kubernetes/kubernetes#107065

Fixes: #3176
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
Prasanna Kumar Kalever
2022-06-23 11:26:10 +05:30
committed by mergify[bot]
parent 05ccb31a45
commit 1da446d2f2
2 changed files with 33 additions and 2 deletions

View File

@ -54,7 +54,7 @@ const (
defaultNS = "default"
defaultPluginPath = "/var/lib/kubelet/plugins"
defaultStagingPath = defaultPluginPath + "/kubernetes.io/csi/pv/"
defaultStagingPath = defaultPluginPath + "/kubernetes.io/csi/"
)
var conf util.Config