advertise multi node capabilities for zfs-local to provide seamless experience
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
parent
4dd57c13bd
commit
e80eff2bda
13
README.md
13
README.md
|
|
@ -53,6 +53,7 @@ Predominantly 3 things are needed:
|
||||||
## Community Guides
|
## Community Guides
|
||||||
|
|
||||||
- https://jonathangazeley.com/2021/01/05/using-truenas-to-provide-persistent-storage-for-kubernetes/
|
- https://jonathangazeley.com/2021/01/05/using-truenas-to-provide-persistent-storage-for-kubernetes/
|
||||||
|
- https://www.lisenet.com/2021/moving-to-truenas-and-democratic-csi-for-kubernetes-persistent-storage/
|
||||||
- https://gist.github.com/admun/4372899f20421a947b7544e5fc9f9117 (migrating
|
- https://gist.github.com/admun/4372899f20421a947b7544e5fc9f9117 (migrating
|
||||||
from `nfs-client-provisioner` to `democratic-csi`)
|
from `nfs-client-provisioner` to `democratic-csi`)
|
||||||
- https://gist.github.com/deefdragon/d58a4210622ff64088bd62a5d8a4e8cc
|
- https://gist.github.com/deefdragon/d58a4210622ff64088bd62a5d8a4e8cc
|
||||||
|
|
@ -148,7 +149,15 @@ necessary.
|
||||||
This `driver` provisions node-local storage. Each node should have an
|
This `driver` provisions node-local storage. Each node should have an
|
||||||
identically named zfs pool created and avaialble to the `driver`. Note, this is
|
identically named zfs pool created and avaialble to the `driver`. Note, this is
|
||||||
_NOT_ the same thing as using the docker zfs storage driver (although the same
|
_NOT_ the same thing as using the docker zfs storage driver (although the same
|
||||||
pool could be used). No other requirements are necessary.
|
pool could be used). Nodes should have the standard `zfs` utilities installed.
|
||||||
|
|
||||||
|
In the name of ease-of-use these drivers by default report `MULTI_NODE` support
|
||||||
|
(`ReadWriteMany` in k8s) however the volumes will implicity only work on the
|
||||||
|
node where originally provisioned. Topology contraints manage this in an
|
||||||
|
automated fashion preventing any undesirable behavior. So while you may
|
||||||
|
provision `MULTI_NODE` / `RWX` volumes, any workloads using the volume will
|
||||||
|
always land a single node and that node will always be the node where the
|
||||||
|
volume is/was provisioned.
|
||||||
|
|
||||||
## Server Prep
|
## Server Prep
|
||||||
|
|
||||||
|
|
@ -380,4 +389,4 @@ A special shout out to the wonderful sponsors of the project!
|
||||||
- https://datamattsson.tumblr.com/post/624751011659202560/welcome-truenas-core-container-storage-provider
|
- https://datamattsson.tumblr.com/post/624751011659202560/welcome-truenas-core-container-storage-provider
|
||||||
- https://github.com/dravanet/truenas-csi
|
- https://github.com/dravanet/truenas-csi
|
||||||
- https://github.com/SynologyOpenSource/synology-csi
|
- https://github.com/SynologyOpenSource/synology-csi
|
||||||
|
- https://github.com/openebs/zfs-localpv
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
|
|
@ -18,26 +18,26 @@
|
||||||
"url": "https://github.com/democratic-csi/democratic-csi.git"
|
"url": "https://github.com/democratic-csi/democratic-csi.git"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "^1.3.6",
|
"@grpc/grpc-js": "^1.5.5",
|
||||||
"@grpc/proto-loader": "^0.6.0",
|
"@grpc/proto-loader": "^0.6.0",
|
||||||
"@kubernetes/client-node": "^0.16.1",
|
"@kubernetes/client-node": "^0.16.3",
|
||||||
"async-mutex": "^0.3.1",
|
"async-mutex": "^0.3.1",
|
||||||
"bunyan": "^1.8.15",
|
"bunyan": "^1.8.15",
|
||||||
"grpc-uds": "^0.1.6",
|
"grpc-uds": "^0.1.6",
|
||||||
"handlebars": "^4.7.7",
|
"handlebars": "^4.7.7",
|
||||||
"js-yaml": "^4.0.0",
|
"js-yaml": "^4.0.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"lru-cache": "^6.0.0",
|
"lru-cache": "^7.3.1",
|
||||||
"prompt": "^1.2.0",
|
"prompt": "^1.2.2",
|
||||||
"request": "^2.88.2",
|
"request": "^2.88.2",
|
||||||
"semver": "^7.3.4",
|
"semver": "^7.3.4",
|
||||||
"ssh2": "^1.1.0",
|
"ssh2": "^1.1.0",
|
||||||
"uri-js": "^4.4.1",
|
"uri-js": "^4.4.1",
|
||||||
"uuid": "^8.3.2",
|
"uuid": "^8.3.2",
|
||||||
"winston": "^3.3.3",
|
"winston": "^3.6.0",
|
||||||
"yargs": "^17.0.1"
|
"yargs": "^17.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^8.1.0"
|
"eslint": "^8.9.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,15 @@ class ControllerZfsLocalDriver extends ControllerZfsBaseDriver {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Although it is conter-intuitive to advertise node-local volumes as RWX we
|
||||||
|
* do so here to provide an easy out-of-the-box experience as users will by
|
||||||
|
* default want to provision volumes of RWX. The topology contraints
|
||||||
|
* implicity will enforce only a single node can use the volume at a given
|
||||||
|
* time.
|
||||||
|
*
|
||||||
|
* @returns Array
|
||||||
|
*/
|
||||||
getAccessModes() {
|
getAccessModes() {
|
||||||
const driverZfsResourceType = this.getDriverZfsResourceType();
|
const driverZfsResourceType = this.getDriverZfsResourceType();
|
||||||
let access_modes = _.get(this.options, "csi.access_modes", null);
|
let access_modes = _.get(this.options, "csi.access_modes", null);
|
||||||
|
|
@ -113,9 +122,9 @@ class ControllerZfsLocalDriver extends ControllerZfsBaseDriver {
|
||||||
"SINGLE_NODE_SINGLE_WRITER", // added in v1.5.0
|
"SINGLE_NODE_SINGLE_WRITER", // added in v1.5.0
|
||||||
"SINGLE_NODE_MULTI_WRITER", // added in v1.5.0
|
"SINGLE_NODE_MULTI_WRITER", // added in v1.5.0
|
||||||
"SINGLE_NODE_READER_ONLY",
|
"SINGLE_NODE_READER_ONLY",
|
||||||
//"MULTI_NODE_READER_ONLY",
|
"MULTI_NODE_READER_ONLY",
|
||||||
//"MULTI_NODE_SINGLE_WRITER",
|
"MULTI_NODE_SINGLE_WRITER",
|
||||||
//"MULTI_NODE_MULTI_WRITER",
|
"MULTI_NODE_MULTI_WRITER",
|
||||||
];
|
];
|
||||||
case "volume":
|
case "volume":
|
||||||
return [
|
return [
|
||||||
|
|
@ -124,8 +133,9 @@ class ControllerZfsLocalDriver extends ControllerZfsBaseDriver {
|
||||||
"SINGLE_NODE_SINGLE_WRITER", // added in v1.5.0
|
"SINGLE_NODE_SINGLE_WRITER", // added in v1.5.0
|
||||||
"SINGLE_NODE_MULTI_WRITER", // added in v1.5.0
|
"SINGLE_NODE_MULTI_WRITER", // added in v1.5.0
|
||||||
"SINGLE_NODE_READER_ONLY",
|
"SINGLE_NODE_READER_ONLY",
|
||||||
//"MULTI_NODE_READER_ONLY",
|
"MULTI_NODE_READER_ONLY",
|
||||||
//"MULTI_NODE_SINGLE_WRITER",
|
"MULTI_NODE_SINGLE_WRITER",
|
||||||
|
"MULTI_NODE_MULTI_WRITER",
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue