@@ -854,13 +854,19 @@ message VolumeCapability {
854
854
message MountVolume {
855
855
// The filesystem type. This field is OPTIONAL.
856
856
// An empty string is equal to an unspecified field value.
857
+ // If SP has DEFER_FS_OPS node capability and CO specifies
858
+ // fs_defer_ops = true then SP MUST pass this field
859
+ // to the container runtime that will mount the file system.
857
860
string fs_type = 1;
858
861
859
862
// The mount options that can be used for the volume. This field is
860
863
// OPTIONAL. `mount_flags` MAY contain sensitive information.
861
864
// Therefore, the CO and the Plugin MUST NOT leak this information
862
865
// to untrusted entities. The total size of this repeated field
863
866
// SHALL NOT exceed 4 KiB.
867
+ // If SP has DEFER_FS_OPS node capability and CO specifies
868
+ // fs_defer_ops = true then SP MUST pass this field
869
+ // to the container runtime that will mount the file system.
864
870
repeated string mount_flags = 2;
865
871
866
872
// If SP has VOLUME_MOUNT_GROUP node capability and CO provides
@@ -875,6 +881,27 @@ message VolumeCapability {
875
881
// both readable and writable by said mount group identifier.
876
882
// This is an OPTIONAL field.
877
883
string volume_mount_group = 3;
884
+
885
+ // If SP has DEFER_FS_OPS_WITH_SUPPLEMENTAL_GROUP node capability
886
+ // and CO provides this field then SP MUST ensure that the
887
+ // volume_supplemental_group parameter is passed as a supplemental
888
+ // Group ID that owns the file system after it has been mounted by
889
+ // the container runtime handler.
890
+ // A CO MUST NOT populate this field if defer_fs_ops is empty
891
+ // This is an OPTIONAL field.
892
+ string volume_supplemental_group = 4 [(alpha_field) = true];
893
+
894
+ // If SP has DEFER_FS_OPS_WITH_SUPPLEMENTAL_GROUP_CHANGE_POLICY node
895
+ // capability and CO provides this field then SP MUST ensure that
896
+ // the volume_supplemental_group_change_policy parameter is passed
897
+ // as the policy through which ownership by a supplemental Group ID
898
+ // is set after it has been mounted by the container runtime
899
+ // handler.
900
+ // A CO MUST NOT populate this field if defer_fs_ops or
901
+ // volume_supplemental_group is empty
902
+ // This is an OPTIONAL field.
903
+ string volume_supplemental_group_change_policy = 5
904
+ [(alpha_field) = true];
878
905
}
879
906
880
907
// Specify how a volume can be accessed.
@@ -2349,6 +2376,13 @@ message NodePublishVolumeRequest {
2349
2376
// This field is OPTIONAL and MUST match the volume_context of the
2350
2377
// volume identified by `volume_id`.
2351
2378
map<string, string> volume_context = 8;
2379
+
2380
+ // Indicates SP MUST defer file system mount and any post-mount
2381
+ // configuration operations (such as application of file system
2382
+ // ownership by a supplemental group, if supported) to
2383
+ // a container runtime handler.
2384
+ // This field is OPTIONAL.
2385
+ bool defer_fs_ops = 9;
2352
2386
}
2353
2387
2354
2388
message NodePublishVolumeResponse {
@@ -2399,6 +2433,11 @@ message NodeUnpublishVolumeRequest {
2399
2433
// system/filesystem, but, at a minimum, SP MUST accept a max path
2400
2434
// length of at least 128 bytes.
2401
2435
string target_path = 2;
2436
+
2437
+ // Indicates SP MUST defer file system dismount and cleanup
2438
+ // to a container runtime handler.
2439
+ // This field is OPTIONAL.
2440
+ bool defer_fs_ops = 3;
2402
2441
}
2403
2442
2404
2443
message NodeUnpublishVolumeResponse {
@@ -2455,6 +2494,11 @@ message NodeGetVolumeStatsRequest {
2455
2494
// system/filesystem, but, at a minimum, SP MUST accept a max path
2456
2495
// length of at least 128 bytes.
2457
2496
string staging_target_path = 3;
2497
+
2498
+ // Indicates SP MUST obtain file system stats from a
2499
+ // container runtime handler (that has mounted the file system).
2500
+ // This field is OPTIONAL.
2501
+ bool defer_fs_ops = 4;
2458
2502
}
2459
2503
2460
2504
message NodeGetVolumeStatsResponse {
@@ -2571,6 +2615,22 @@ message NodeServiceCapability {
2571
2615
// with provided volume group identifier during node stage
2572
2616
// or node publish RPC calls.
2573
2617
VOLUME_MOUNT_GROUP = 6;
2618
+
2619
+ // Indicates that Node service supports deferring file system
2620
+ // mount and management operations to a container runtime handler.
2621
+ DEFER_FS_OPS = 7 [(alpha_enum_value) = true];
2622
+
2623
+ // Indicates that Node service supports passing a supplemental
2624
+ // Group ID as a post mount configuration when deferring
2625
+ // file system mount to a container runtime handler.
2626
+ DEFER_FS_OPS_WITH_SUPPLEMENTAL_GROUP = 8
2627
+ [(alpha_enum_value) = true];
2628
+
2629
+ // Indicates that Node service supports passing a supplemental
2630
+ // Group ID change policy as a post mount configuration when
2631
+ // deferring file system mount to a container runtime handler.
2632
+ DEFER_FS_OPS_WITH_SUPPLEMENTAL_GROUP_CHANGE_POLICY = 9
2633
+ [(alpha_enum_value) = true];
2574
2634
}
2575
2635
2576
2636
Type type = 1;
@@ -2640,6 +2700,13 @@ message NodeGetInfoResponse {
2640
2700
// Indicates the node exists within the "region" "R1" and the "zone"
2641
2701
// "Z2".
2642
2702
Topology accessible_topology = 3;
2703
+
2704
+ // If SP has DEFER_FS_OPS node capability, a plugin MUST populate
2705
+ // this field with the list of file systems that it supports. A CO
2706
+ // SHOULD use this to match the deferral capabilities of a plugin
2707
+ // with a container runtime handler for a workload.
2708
+ // This field is OPTIONAL.
2709
+ repeated string supported_file_systems = 4;
2643
2710
}
2644
2711
```
2645
2712
@@ -2717,6 +2784,11 @@ message NodeExpandVolumeRequest {
2717
2784
// section on how to use this field.
2718
2785
map<string, string> secrets = 6
2719
2786
[(csi_secret) = true, (alpha_field) = true];
2787
+
2788
+ // Indicates SP MUST defer file system expansion to a
2789
+ // container runtime handler (that has mounted the file system).
2790
+ // This field is OPTIONAL.
2791
+ bool defer_fs_ops = 7 [(alpha_enum_value) = true];
2720
2792
}
2721
2793
2722
2794
message NodeExpandVolumeResponse {
@@ -2785,6 +2857,13 @@ message NodeExpandVolumeResponse {
2785
2857
* Plugins SHALL NOT create additional files or directories adjacent to the UNIX socket specified by ` CSI_ENDPOINT ` ; violations of this requirement constitute "abuse".
2786
2858
* The Plugin Supervisor is the ultimate authority of the directory in which the UNIX socket endpoint is created and MAY enforce policies to prevent and/or mitigate abuse of the directory by Plugins.
2787
2859
2860
+ #### Deferring Filesystem Mount and Management to a Container Runtime Handler
2861
+ A Plugin may have the capability to defer file system mount and management operations to a container runtime handler.
2862
+ The CO SHOULD populate ` defer_fs_ops ` as ` True ` in CSI Node APIs when the following conditions are fulfilled:
2863
+ - The container runtime handler (associated with a workload) supports deferral of file system mount and management operations from a CSI plugin.
2864
+ - The CSI plugin is able to support deferral of file system mount and management operations to a container runtime handler.
2865
+ - Both container runtime handler and CSI plugin is compatible around support for mounting specific file systems and applying post-mount configuration based on the workload spec (e.g. supplemental group ownership)
2866
+
2788
2867
### Supervised Lifecycle Management
2789
2868
2790
2869
* For Plugins packaged in software form:
0 commit comments