Parse tagSelectors for CSI provisioner
@@ -5,6 +5,7 @@ import (
"fmt"
"os"
"strconv"
+ "strings"
"github.com/pkg/errors"
"github.com/robfig/cron"
@@ -56,6 +57,14 @@ func getVolumeOptions(volOptions map[string]string) (*longhornclient.Volume, err
vol.RecurringJobs = recurringJobs
}
+ if diskSelector, ok := volOptions["diskSelector"]; ok {
+ vol.DiskSelector = strings.Split(diskSelector, ",")
+ }
+
+ if nodeSelector, ok := volOptions["nodeSelector"]; ok {
+ vol.NodeSelector = strings.Split(nodeSelector, ",")
+ }
+
return vol, nil
}
