allow overriding access_modes via config

Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
Travis Glenn Hansen 2022-02-08 21:05:27 -07:00
parent 773336e110
commit 4dd57c13bd
1 changed files with 6 additions and 3 deletions

View File

@ -17,14 +17,13 @@ class ControllerZfsLocalDriver extends ControllerZfsBaseDriver {
);
super(...arguments);
if (!i_caps) {
this.ctx.logger.debug("setting zfs-local identity service caps");
options.service.identity.capabilities.service = [
//"UNKNOWN",
"CONTROLLER_SERVICE",
"VOLUME_ACCESSIBILITY_CONSTRAINTS"
"VOLUME_ACCESSIBILITY_CONSTRAINTS",
];
}
}
@ -102,6 +101,10 @@ class ControllerZfsLocalDriver extends ControllerZfsBaseDriver {
getAccessModes() {
const driverZfsResourceType = this.getDriverZfsResourceType();
let access_modes = _.get(this.options, "csi.access_modes", null);
if (access_modes !== null) {
return access_modes;
}
switch (driverZfsResourceType) {
case "filesystem":
return [