3
3
4
4
To get started with this template:
5
5
6
- - [ ] **Pick a hosting SIG.**
6
+ - [X ] **Pick a hosting SIG.**
7
7
Make sure that the problem space is something the SIG is interested in taking
8
8
up. KEPs should not be checked in without a sponsoring SIG.
9
- - [ ] **Create an issue in kubernetes/enhancements**
9
+ - [X ] **Create an issue in kubernetes/enhancements**
10
10
When filing an enhancement tracking issue, please make sure to complete all
11
11
fields in that template. One of the fields asks for a link to the KEP. You
12
12
can leave that blank until this KEP is filed, and then go back to the
13
13
enhancement and add the link.
14
- - [ ] **Make a copy of this template directory.**
14
+ - [X ] **Make a copy of this template directory.**
15
15
Copy this template into the owning SIG's directory and name it
16
16
`NNNN-short-descriptive-title`, where `NNNN` is the issue number (with no
17
17
leading-zero padding) assigned to your enhancement above.
18
- - [ ] **Fill out as much of the kep.yaml file as you can.**
18
+ - [X ] **Fill out as much of the kep.yaml file as you can.**
19
19
At minimum, you should fill in the "Title", "Authors", "Owning-sig",
20
20
"Status", and date-related fields.
21
21
- [ ] **Fill out this file as best you can.**
@@ -58,7 +58,7 @@ If none of those approvers are still appropriate, then changes to that list
58
58
should be approved by the remaining approvers and/or the owning SIG (or
59
59
SIG Architecture for cross-cutting KEPs).
60
60
-->
61
- # KEP-NNNN: Your short, descriptive title
61
+ # KEP-2485: ReadWriteOncePod PersistentVolume AccessMode
62
62
63
63
<!--
64
64
This is the title of your KEP. Keep it short, simple, and descriptive. A good
@@ -79,7 +79,10 @@ tags, and then generate with `hack/update-toc.sh`.
79
79
<!-- toc -->
80
80
- [ Release Signoff Checklist] ( #release-signoff-checklist )
81
81
- [ Summary] ( #summary )
82
+ - [ Glossary] ( #glossary )
82
83
- [ Motivation] ( #motivation )
84
+ - [ Kubernetes Changes] ( #kubernetes-changes )
85
+ - [ CSI Specification Changes] ( #csi-specification-changes )
83
86
- [ Goals] ( #goals )
84
87
- [ Non-Goals] ( #non-goals )
85
88
- [ Proposal] ( #proposal )
@@ -165,6 +168,38 @@ updates.
165
168
[documentation style guide]: https://github.com/kubernetes/community/blob/master/contributors/guide/style-guide.md
166
169
-->
167
170
171
+ This KEP introduces a new ReadWriteOncePod access mode for PersistentVolumes
172
+ that restricts access to a single pod on a single node. This access mode
173
+ differs from the existing ReadWriteOnce (RWO) access mode, which restricts
174
+ access to a single node, but allows simultaneous access from many pods on that
175
+ node.
176
+
177
+ Additionally, this KEP outlines required changes to the CSI spec, drivers, and
178
+ sidecars in order to support this new access mode while maintaining backwards
179
+ compatibility.
180
+
181
+ ## Glossary
182
+
183
+ - [ Node]
184
+ - A virtual or physical machine in a Kubernetes cluster that runs pods
185
+ - [ PersistentVolume]
186
+ - A piece of storage in the cluster that has been provisioned by an
187
+ administrator or dynamically provisioned using ` StorageClasses `
188
+ - Access mode
189
+ - A description of how a PersistentVolume can be accessed
190
+ - ReadWriteOnce (RWO)
191
+ - An access mode that restricts PersistentVolume access to a single node
192
+ - ReadWriteOncePod (RWOP)
193
+ - A new access mode that restricts PersistentVolume access to a single pod on
194
+ a single node
195
+ - [ CSI]
196
+ - The Container Storage Interface, a specification for storage provider
197
+ plugins to integrate with cluster orchestrators (like Kubernetes)
198
+
199
+ [ Node ] : https://kubernetes.io/docs/concepts/architecture/nodes/
200
+ [ PersistentVolume ] : https://kubernetes.io/docs/concepts/storage/persistent-volumes/
201
+ [ CSI ] : https://github.com/container-storage-interface/spec
202
+
168
203
## Motivation
169
204
170
205
<!--
@@ -176,13 +211,60 @@ demonstrate the interest in a KEP within the wider Kubernetes community.
176
211
[experience reports]: https://github.com/golang/go/wiki/ExperienceReports
177
212
-->
178
213
214
+ ### Kubernetes Changes
215
+
216
+ Kubernetes does not have an access mode for PersistentVolumes that allows users
217
+ to restrict access to a single pod on a single node. This can cause problems for
218
+ certain workloads. For example, if you had a workload (using ReadWriteOnce)
219
+ performing an update of a storage device and the workload scaled to more than
220
+ one Pod, you could encounter issues if the second pod landed on the same node
221
+ and started simultaneously modifying the device.
222
+
223
+ For sensitive workloads, users have to work around the lack of a single-workload
224
+ access mode in other ways (for example, scheduling only a single pod on a node
225
+ and using ReadWriteOnce), which can lead to inefficient use of resources in
226
+ their cluster.
227
+
228
+ See [ #30085 ] and [ #26567 ] for issues related to this.
229
+
230
+ [ #30085 ] : https://github.com/kubernetes/kubernetes/issues/30085
231
+ [ #26567 ] : https://github.com/kubernetes/kubernetes/issues/26567
232
+
233
+ ### CSI Specification Changes
234
+
235
+ In the CSI spec there are conflicting definitions of the [ ` SINGLE_NODE_WRITER ` ]
236
+ access mode. By definition, ` SINGLE_NODE_WRITER ` means "Can only be published
237
+ once as read/write on a single node, at any given time." The problem is how this
238
+ access mode is used during ` NodePublishVolume ` , which is typically where volume
239
+ mounting is performed.
240
+
241
+ The CSI spec defines that when [ ` NodePublishVolume ` ] is called a second time for
242
+ a volume with a non-` MULTI_NODE ` access mode and with a different target path,
243
+ the plugin should return ` FAILED_PRECONDITION ` . For CSI plugins that strictly
244
+ adhere to the spec, this guarantees that a volume can only be mounted to a
245
+ single target path, which means ` SINGLE_NODE_WRITER ` restricts access to a
246
+ single pod on a single node. This behavior conflicts with the original
247
+ definition. Due to this conflict, we do not have an access mode that represents
248
+ multiple writers on the same node.
249
+
250
+ [ `SINGLE_NODE_WRITER` ] : https://github.com/container-storage-interface/spec/blob/v1.4.0/csi.proto#L405-L407
251
+ [ `NodePublishVolume` ] : https://github.com/container-storage-interface/spec/blob/v1.4.0/spec.md#nodepublishvolume
252
+
179
253
### Goals
180
254
181
255
<!--
182
256
List the specific goals of the KEP. What is it trying to achieve? How will we
183
257
know that this has succeeded?
184
258
-->
185
259
260
+ - Outline expected behavior of the ReadWriteOncePod access mode
261
+ - Provide a high level design for ReadWriteOncePod access mode support
262
+ - Define API changes needed to support this access mode
263
+ - Outline changes needed in CSI spec and sidecars to support the
264
+ ReadWriteOncePod access mode
265
+ - Outline changes needed in CSI spec and sidecars to continue supporting the
266
+ ReadWriteOnce access mode
267
+
186
268
### Non-Goals
187
269
188
270
<!--
0 commit comments