2024-03-02 22:05:30 +01:00
|
|
|
{lib}: {
|
|
|
|
volume_name,
|
|
|
|
access_mode,
|
|
|
|
server,
|
|
|
|
share,
|
|
|
|
mount_flags ? [],
|
|
|
|
provider ? null,
|
2023-06-15 23:04:14 +02:00
|
|
|
}:
|
|
|
|
{
|
2024-03-02 22:05:30 +01:00
|
|
|
type = "csi";
|
|
|
|
plugin_id = "org.democratic-csi.nfs";
|
|
|
|
volume_id = volume_name;
|
|
|
|
name = volume_name;
|
2023-06-15 23:04:14 +02:00
|
|
|
external_id = volume_name;
|
|
|
|
|
|
|
|
capability = {
|
|
|
|
inherit access_mode;
|
|
|
|
attachment_mode = "file-system";
|
|
|
|
};
|
|
|
|
|
|
|
|
context = {
|
|
|
|
inherit server share;
|
|
|
|
node_attach_driver = "nfs";
|
|
|
|
provisioner_driver = "node-manual";
|
|
|
|
};
|
|
|
|
|
|
|
|
mount_options = {
|
|
|
|
fs_type = "nfs";
|
|
|
|
inherit mount_flags;
|
|
|
|
};
|
2024-03-02 22:05:30 +01:00
|
|
|
}
|
|
|
|
// (lib.optionalAttrs (provider != null) {inherit provider;})
|