allow overriding access_modes via config
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
		
							parent
							
								
									773336e110
								
							
						
					
					
						commit
						4dd57c13bd
					
				|  | @ -17,14 +17,13 @@ class ControllerZfsLocalDriver extends ControllerZfsBaseDriver { | ||||||
|     ); |     ); | ||||||
|     super(...arguments); |     super(...arguments); | ||||||
| 
 | 
 | ||||||
|      |  | ||||||
|     if (!i_caps) { |     if (!i_caps) { | ||||||
|       this.ctx.logger.debug("setting zfs-local identity service caps"); |       this.ctx.logger.debug("setting zfs-local identity service caps"); | ||||||
| 
 | 
 | ||||||
|       options.service.identity.capabilities.service = [ |       options.service.identity.capabilities.service = [ | ||||||
|         //"UNKNOWN",
 |         //"UNKNOWN",
 | ||||||
|         "CONTROLLER_SERVICE", |         "CONTROLLER_SERVICE", | ||||||
|         "VOLUME_ACCESSIBILITY_CONSTRAINTS" |         "VOLUME_ACCESSIBILITY_CONSTRAINTS", | ||||||
|       ]; |       ]; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  | @ -102,6 +101,10 @@ class ControllerZfsLocalDriver extends ControllerZfsBaseDriver { | ||||||
| 
 | 
 | ||||||
|   getAccessModes() { |   getAccessModes() { | ||||||
|     const driverZfsResourceType = this.getDriverZfsResourceType(); |     const driverZfsResourceType = this.getDriverZfsResourceType(); | ||||||
|  |     let access_modes = _.get(this.options, "csi.access_modes", null); | ||||||
|  |     if (access_modes !== null) { | ||||||
|  |       return access_modes; | ||||||
|  |     } | ||||||
|     switch (driverZfsResourceType) { |     switch (driverZfsResourceType) { | ||||||
|       case "filesystem": |       case "filesystem": | ||||||
|         return [ |         return [ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue