Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
remove hardcoded enforcement of usage only pxd driver
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeygorobets committed Sep 4, 2020
1 parent 410c2a6 commit e2ae4dd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frameworks/cassandra/src/main/dist/svc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pods:
portworx-volume:
type: DOCKER
container-path: container-path
driver-name: pxd
driver-name: {{CASSANDRA_EXTERNAL_VOLUME_DRIVER_NAME}}
driver-options: '{{{CASSANDRA_EXTERNAL_VOLUME_PORTWORX_OPTIONS}}}'
{{#CASSANDRA_EXTERNAL_VOLUME_NAME}}
volume-name: {{CASSANDRA_EXTERNAL_VOLUME_NAME}}
Expand Down
5 changes: 5 additions & 0 deletions frameworks/cassandra/universe/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,11 @@
"type": "string",
"description": "Volume name. If empty service path will be used.",
"default": ""
},
"driver_name": {
"type": "string",
"description": "Docker volume driver name.",
"default": "pxd"
}
}
},
Expand Down
1 change: 1 addition & 0 deletions frameworks/cassandra/universe/marathon.json.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
"CASSANDRA_EXTERNAL_VOLUME_ENABLED" : "{{nodes.external_volume.enabled}}",
"CASSANDRA_EXTERNAL_VOLUME_PORTWORX_OPTIONS" : "{{nodes.external_volume.portworx_volume_options}}",
"CASSANDRA_EXTERNAL_VOLUME_NAME" : "{{nodes.external_volume.volume_name}}",
"CASSANDRA_EXTERNAL_VOLUME_DRIVER_NAME" : "{{nodes.external_volume.driver_name}}",
"TASKCFG_ALL_CASSANDRA_HEAP_SIZE_MB": "{{nodes.heap.size}}",
"TASKCFG_ALL_CASSANDRA_HEAP_NEW_MB": "{{nodes.heap.new}}",
"CASSANDRA_JAVA_URI": "{{resource.assets.uris.cassandra-jre-tar-gz}}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,12 @@ public static ExternalVolumeProvider getExternalVolumeProvider(String serviceNam
Map<String, String> driverOptions)
{

if ("pxd".equals(driverName)) {
return new PortworxVolumeProvider(
serviceName,
volumeName,
driverName,
podType,
podIndex,
driverOptions);
} else {
throw new IllegalArgumentException("Unsupported external volume driver " + driverName);
}
}
}

0 comments on commit e2ae4dd

Please sign in to comment.