diff --git a/book/src/csi-driver-object.md b/book/src/csi-driver-object.md index c88482cc..412f82f7 100644 --- a/book/src/csi-driver-object.md +++ b/book/src/csi-driver-object.md @@ -47,6 +47,7 @@ There are three important fields: * `"csi.storage.k8s.io/pod.name": pod.Name` * `"csi.storage.k8s.io/pod.namespace": pod.Namespace` * `"csi.storage.k8s.io/pod.uid": string(pod.UID)` + * `"csi.storage.k8s.io/serviceAccount.name": pod.Spec.ServiceAccountName` * For more information see [Pod Info on Mount](pod-info.md). * `volumeLifecycleModes` * This field was added in Kubernetes 1.16 and cannot be set when using an older Kubernetes release. diff --git a/book/src/pod-info.md b/book/src/pod-info.md index ecfee577..941c5cd6 100644 --- a/book/src/pod-info.md +++ b/book/src/pod-info.md @@ -20,7 +20,7 @@ The [CSIDriver Object](csi-driver-object.md) enables CSI Drivers to specify how Specifically the `podInfoOnMount` field instructs Kubernetes that the CSI driver requires additional pod information (like podName, podUID, etc.) during mount operations. -For example, the existence of the following object would cause Kubernetes to add pod information at mount time to the `NodePublishVolumeRequest.publish_context` map. +For example, the existence of the following object would cause Kubernetes to add pod information at mount time to the `NodePublishVolumeRequest.volume_context` map. ``` apiVersion: storage.k8s.io/v1beta1 @@ -31,12 +31,13 @@ spec: podInfoOnMount: true ``` -If the `podInfoOnMount` field is set to `true`, during mount, Kubelet will add the following key/values to the `publish_context` field in the CSI `NodePublishVolumeRequest`: +If the `podInfoOnMount` field is set to `true`, during mount, Kubelet will add the following key/values to the `volume_context` field in the CSI `NodePublishVolumeRequest`: * `csi.storage.k8s.io/pod.name: {pod.Name}` * `csi.storage.k8s.io/pod.namespace: {pod.Namespace}` * `csi.storage.k8s.io/pod.uid: {pod.UID}` +* `csi.storage.k8s.io/serviceAccount.name: {pod.Spec.ServiceAccountName}` The CSIDriver object should be manually included in the driver manifests.