@@ -56,7 +56,7 @@ type NFSInstancePersistentVolumeSource struct {
5656 // +required
5757 Server string `json:"server" protobuf:"bytes,1,name=server"`
5858
59- // Path is the exported NFS share from the server.
59+ // Share is the path of NFS share from the server.
6060 // For each InstancePersistentVolume,
6161 // a corresponding subpath will be created in the NFS share.
6262 //
@@ -65,12 +65,31 @@ type NFSInstancePersistentVolumeSource struct {
6565 // +default="/"
6666 // +k8s:validation:pattern="^(/[^/]+)+$"
6767 // +k8s:validation:maxLength=1024
68- Path string `json:"path,omitempty" protobuf:"bytes,2,opt,name=path"`
68+ Share string `json:"path,omitempty" protobuf:"bytes,2,opt,name=path"`
69+
70+ // SubDirectory is the subdirectory in the NFS share for each InstancePersistentVolume.
71+ // If it is blank, the subdirectory will be the same as the volume ID of the InstancePersistentVolume.
72+ //
73+ // It supports a specific string or the following template variables:
74+ // - `${pvc.metadata.name}`: the name the corresponding PersistentVolumeClaim.
75+ // - `${pvc.metadata.namespace}`: the namespace of the corresponding PersistentVolumeClaim.
76+ // - `${pv.metadata.name}`: the name of the corresponding Kubernetes PersistentVolume.
77+ //
78+ // For example, specify `${pvc.metadata.namespace}/${pvc.metadata.name}` to create a subdirectory
79+ // with the namespaced name of the corresponding PersistentVolumeClaim in the NFS share
80+ // for each InstancePersistentVolume.
81+ //
82+ // Immutable after creation.
83+ SubDirectory string `json:"subDirectory,omitempty" protobuf:"bytes,3,opt,name=subDirectory"`
84+
85+ // MountPermissions is the mounted directory permissions.
86+ // If it is non-zero, perform a chmod with the specified permissions after mounted.
87+ MountPermissions string `json:"mountPermissions,omitempty" protobuf:"bytes,4,opt,name=mountPermissions"`
6988
7089 // MountOptions is the mount options for the NFS share.
7190 //
7291 // +default=["hard","nfsvers=4.1","rsize=1048576","wsize=1048576","noatime","nodiratime"]
73- MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,3 ,opt,name=mountOptions"`
92+ MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,5 ,opt,name=mountOptions"`
7493}
7594
7695// S3InstancePersistentVolumeSource defines the source of S3.
0 commit comments