From 87beaac25bbdce34c4bc72d3a06ee530c6c723f4 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Mon, 9 Aug 2021 19:19:19 +0530 Subject: [PATCH] rbd: add ReadWriteOncePod in accessModeStrToInt() conversion function Signed-off-by: Humble Chirammal --- internal/rbd/rbd_healer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/rbd/rbd_healer.go b/internal/rbd/rbd_healer.go index bb7b2ae94..73d5677dc 100644 --- a/internal/rbd/rbd_healer.go +++ b/internal/rbd/rbd_healer.go @@ -34,7 +34,7 @@ const ( ) // accessModeStrToInt convert access mode type string to int32. -// Makesure to update this function as and when there are new modes introduced. +// Make sure to update this function as and when there are new modes introduced. func accessModeStrToInt(mode v1.PersistentVolumeAccessMode) csi.VolumeCapability_AccessMode_Mode { switch mode { case v1.ReadWriteOnce: @@ -43,6 +43,8 @@ func accessModeStrToInt(mode v1.PersistentVolumeAccessMode) csi.VolumeCapability return csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY case v1.ReadWriteMany: return csi.VolumeCapability_AccessMode_MULTI_NODE_MULTI_WRITER + case v1.ReadWriteOncePod: + return csi.VolumeCapability_AccessMode_SINGLE_NODE_SINGLE_WRITER } return csi.VolumeCapability_AccessMode_UNKNOWN