util: add CSIDriver.GetInstanceID()

There has been some confusion about using different variables for the
InstanceID of the RBD-driver. By removing the global variable
CSIInstanceID, there should be no confusion anymore what variable to
use.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos
2024-08-02 15:19:02 +02:00
committed by mergify[bot]
parent 0092a47586
commit dfb48bac17
9 changed files with 36 additions and 24 deletions

View File

@ -39,7 +39,7 @@ func NewDriver() *Driver {
// ceph CSI driver which can serve multiple parallel requests.
func (fs *Driver) Run(conf *util.Config) {
// Initialize default library driver
cd := csicommon.NewCSIDriver(conf.DriverName, util.DriverVersion, conf.NodeID)
cd := csicommon.NewCSIDriver(conf.DriverName, util.DriverVersion, conf.NodeID, conf.InstanceID)
if cd == nil {
log.FatalLogMsg("failed to initialize CSI driver")
}