You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* For more information see [Pod Info on Mount](pod-info.md).
51
+
* `volumeLifecycleModes`
52
+
* This field was added in Kubernetes 1.16 and cannot be set when using an older Kubernetes release.
53
+
* It informs Kubernetes about the volume modes that are supported by the driver.
54
+
This ensures that the driver [is not used incorrectly](https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/20190122-csi-inline-volumes.md#support-for-inline-csi-volumes) by Kubernetes.
55
+
The default is `Persistent`, which is the normal PVC/PV mechanism. `Ephemeral` enables
56
+
[inline ephemeral volumes](ephemeral-local-volumes.md) in addition (when both
57
+
are listed) or instead of normal volumes (when it is the only entry in the list).
48
58
49
59
## What creates the CSIDriver object?
50
60
@@ -64,28 +74,31 @@ Using the `CSIDriver` object, it is now possible to query Kubernetes to get a li
64
74
65
75
```
66
76
$> kubectl get csidrivers.storage.k8s.io
67
-
NAME AGE
68
-
csi-hostpath 2m
77
+
NAME CREATED AT
78
+
hostpath.csi.k8s.io2019-09-13T09:58:43Z
69
79
```
70
80
Or get a more detailed view of your registered driver with:
Copy file name to clipboardExpand all lines: book/src/ephemeral-local-volumes.md
+13-4Lines changed: 13 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@
4
4
5
5
Status | Min K8s Version | Max K8s Version
6
6
--|--|--
7
-
Alpha | 1.15 | -
7
+
Alpha | 1.15 | 1.15
8
+
Beta | 1.16 | -
8
9
9
10
## Overview
10
11
Traditionally, volumes that are backed by CSI drivers can only be used with a `PersistentVolume` and `PersistentVolumeClaim` object combination. This feature supports ephemeral storage use cases and allows CSI volumes to be specified directly in the pod specification. At runtime, nested inline volumes follow the ephemeral lifecycle of their associated pods where the driver handles all phases of volume operations as pods are created and destroyed.
@@ -38,12 +39,20 @@ Drivers must be modified (or implemented specifically) to support inline ephemer
38
39
- Identity service
39
40
- Node service
40
41
42
+
Kubernetes 1.16 only allows using a CSI driver for an inline volume if
43
+
its [`CSIDriverInfo`](csi-driver-object.md) object explicitly declares
44
+
that the driver supports that kind of usage in its
45
+
`volumeLifecycleModes`field. This is a safeguard against accidentally
46
+
[using a driver the wrong way](https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/20190122-csi-inline-volumes.md#support-for-inline-csi-volumes).
47
+
41
48
### Feature gates
42
-
To use inline volume, Kubernetes binaries must start with the `CSIInlineVolume` feature gate enabled:
49
+
To use inline volume, Kubernetes 1.15 binaries must start with the `CSIInlineVolume` feature gate enabled:
43
50
```
44
51
--feature-gates=CSIInlineVolume=true
45
52
```
46
53
54
+
Kubernetes >= 1.16 no longer needs this as the feature is enabled by default.
55
+
47
56
### Example implementation
48
-
- [CSI Hostpath driver](https://github.com/kubernetes-csi/csi-driver-host-path) - an example driver that can be configured to support either PVC/PV or inline ephemeral volumes at runtime.
49
-
- [Image populator plugin](https://github.com/kubernetes-csi/csi-driver-image-populator) - an example CSI driver plugin that uses a container image as a volume.
57
+
- [CSI Hostpath driver](https://github.com/kubernetes-csi/csi-driver-host-path) - an example driver that supports both modes and determines the mode on a case-by-case basis (for Kubernetes 1.16) or can be deployed with support for just one of the two modes (for Kubernetes 1.15).
58
+
- [Image populator plugin](https://github.com/kubernetes-csi/csi-driver-image-populator) - an example CSI driver plugin that uses a container image as a volume.
0 commit comments