Skip to content

Commit d023b09

Browse files
committed
KEP-2485: Summary, glossary, motivation, goals
1 parent c05568f commit d023b09

File tree

1 file changed

+87
-5
lines changed
  • keps/sig-storage/2485-read-write-once-pod-pv-access-mode

1 file changed

+87
-5
lines changed

keps/sig-storage/2485-read-write-once-pod-pv-access-mode/README.md

Lines changed: 87 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
44
To get started with this template:
55
6-
- [ ] **Pick a hosting SIG.**
6+
- [X] **Pick a hosting SIG.**
77
Make sure that the problem space is something the SIG is interested in taking
88
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**
1010
When filing an enhancement tracking issue, please make sure to complete all
1111
fields in that template. One of the fields asks for a link to the KEP. You
1212
can leave that blank until this KEP is filed, and then go back to the
1313
enhancement and add the link.
14-
- [ ] **Make a copy of this template directory.**
14+
- [X] **Make a copy of this template directory.**
1515
Copy this template into the owning SIG's directory and name it
1616
`NNNN-short-descriptive-title`, where `NNNN` is the issue number (with no
1717
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.**
1919
At minimum, you should fill in the "Title", "Authors", "Owning-sig",
2020
"Status", and date-related fields.
2121
- [ ] **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
5858
should be approved by the remaining approvers and/or the owning SIG (or
5959
SIG Architecture for cross-cutting KEPs).
6060
-->
61-
# KEP-NNNN: Your short, descriptive title
61+
# KEP-2485: ReadWriteOncePod PersistentVolume AccessMode
6262

6363
<!--
6464
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`.
7979
<!-- toc -->
8080
- [Release Signoff Checklist](#release-signoff-checklist)
8181
- [Summary](#summary)
82+
- [Glossary](#glossary)
8283
- [Motivation](#motivation)
84+
- [Kubernetes Changes](#kubernetes-changes)
85+
- [CSI Specification Changes](#csi-specification-changes)
8386
- [Goals](#goals)
8487
- [Non-Goals](#non-goals)
8588
- [Proposal](#proposal)
@@ -165,6 +168,38 @@ updates.
165168
[documentation style guide]: https://github.com/kubernetes/community/blob/master/contributors/guide/style-guide.md
166169
-->
167170

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+
168203
## Motivation
169204

170205
<!--
@@ -176,13 +211,60 @@ demonstrate the interest in a KEP within the wider Kubernetes community.
176211
[experience reports]: https://github.com/golang/go/wiki/ExperienceReports
177212
-->
178213

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+
179253
### Goals
180254

181255
<!--
182256
List the specific goals of the KEP. What is it trying to achieve? How will we
183257
know that this has succeeded?
184258
-->
185259

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+
186268
### Non-Goals
187269

188270
<!--

0 commit comments

Comments
 (0)