Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pod info on mount: fix some errors #249

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions book/src/csi-driver-object.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 3 additions & 2 deletions book/src/pod-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

Expand Down