So let's take each part of the CSIVolumeSource:
- for the
Driver
string field, it needs to be "csi-driver-projected-resource.openshift.io". - for the
VolumeAttributes
map, this driver currently adds the "share" key (which maps the theShare
instance yourPod
wants to use) in addition to the elements of thePod
the kubelet stores when contacting the driver to provision theVolume
. See this list. - the
ReadOnly
field is honored. The driver can even update the content for a read-onlyVolume
, even as thePod
consuming theVolume
cannot write to theVolume
. However, a limitation exists which makes any updates of content for read-onlyVolumes
OFFICIALLY unsupported. Namely, the function will not work across driver restarts. The driver loses access to the kubelet's mount for theVolume
. This is not the case for read-writeVolumes
. The driver is able to update the content of read-writeVolumes
provisioned before the latest restart of the driver. - Also, mounting of one
Share
off of a subdirectory of anotherShare
is only supported with read-writeVolumes
. - the
FSType
field is ignored. This driver by design only supportstmpfs
, with a different mount performed for eachVolume
, in order to defer all SELinux concerns to the kubelet. - the
NodePublishSecretRef
field is ignored. The CSINodePublishVolume
andNodeUnpublishVolume
flows gate the permission evaluation required for theVolume
by performingSubjectAccessReviews
against the referenceShare
instance, using theserviceAccount
of thePod
as the subject.