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
-[API Server Version N / Scheduler Version N / Kubelet Version N-1 or N-2](#api-server-version-n--scheduler-version-n--kubelet-version-n-1-or-n-2)
110
+
-[API Server Version N / Scheduler Version N-1 / Kubelet Version N-1 or N-2](#api-server-version-n--scheduler-version-n-1--kubelet-version-n-1-or-n-2)
111
+
-[API Understands ReadWriteOncePod, CSI Sidecars Do Not](#api-understands-readwriteoncepod-csi-sidecars-do-not)
112
+
-[CSI Controller Service Understands New CSI Access Modes, CSI Node Service Does Not](#csi-controller-service-understands-new-csi-access-modes-csi-node-service-does-not)
- Kubernetes supports ReadWriteOncePod access mode, has unit test coverage, has
575
+
updated CSI spec
576
+
- CSI sidecars support `SINGLE_NODE_*_WRITER` access modes and have unit test
577
+
coverage
578
+
579
+
#### Beta
580
+
581
+
- ReadWriteOncePod access mode has end to end test coverage
582
+
- Mock CSI driver supports `SINGLE_NODE_*_WRITER` access modes, relevant end to
583
+
end tests updated to use this driver
584
+
- Hostpath CSI driver supports `SINGLE_NODE_*_WRITER` access modes, relevant end
585
+
to end tests updated to use this driver
586
+
587
+
#### GA
588
+
589
+
- Kubernetes API and CSI spec changes are stable
590
+
- CSI drivers support `SINGLE_NODE_*_WRITER` access modes
591
+
432
592
### Upgrade / Downgrade Strategy
433
593
434
594
<!--
@@ -443,6 +603,24 @@ enhancement:
443
603
cluster required to make on upgrade, in order to make use of the enhancement?
444
604
-->
445
605
606
+
In order to upgrade a cluster to use this feature, the user will need to restart
607
+
the kube-apiserver, kube-controller-manager, kube-scheduler, and kubelet with
608
+
the ReadWriteOncePod feature gate enabled. Additionally they will need to
609
+
update their CSI drivers and sidecars to versions that depend on the new
610
+
Kubernetes API and CSI spec.
611
+
612
+
When downgrading a cluster to disable this feature, the user will need to
613
+
restart the kube-apiserver with the ReadWriteOncePod feature gate disabled. When
614
+
disabling this feature gate, any existing volumes with the ReadWriteOncePod
615
+
access mode will continue to exist, but can only be deleted. An alternative is
616
+
to allow these volumes to be treated as ReadWriteOnce, however that would
617
+
violate the intent of the user and so it is not recommended.
618
+
619
+
If a user downgrades their CSI drivers or sidecars, any existing volumes using
620
+
ReadWriteOnce should continue working (switching from `SINGLE_NODE_MULTI_WRITER`
621
+
to `SINGLE_NODE_WRITER`). This behavior is ultimately up to each CSI driver, but
622
+
they should be designed with this backwards compatibility in mind.
623
+
446
624
### Version Skew Strategy
447
625
448
626
<!--
@@ -458,6 +636,62 @@ enhancement:
458
636
CRI or CNI may require updating that component before the kubelet.
459
637
-->
460
638
639
+
640
+
#### API Server Version N / Scheduler Version N / Kubelet Version N-1 or N-2
641
+
642
+
When starting two pods with both using the same PVC with ReadWriteOncePod, one pod
643
+
will successfully start, but the other will not be scheduled due to the
644
+
ReadWriteOncePod access mode conflict.
645
+
646
+
When starting the same two pods but also setting `pod.spec.nodeName` to the same
647
+
node, kubelet will not enforce the access mode and will proceed with starting
648
+
both pods.
649
+
650
+
For older kubelets, [ReadWriteOncePod will map to access mode `UNKNOWN`]. How
651
+
this access mode is used will vary across CSI drivers. By definition, the CSI
652
+
spec says ["If ANY of the specified volume capabilities are not supported by the
653
+
SP, the call MUST return the appropriate gRPC error code"], see the
654
+
`volume_capabilities` field in CreateVolumeRequest. However, not all CSI drivers
655
+
strictly adhere to this spec. For example, the EBS CSI driver will [error when
656
+
supplied an unsupported access mode]. Other drivers like the mock CSI driver
657
+
[won't check the supplied access modes], meaning `UNKNOWN` is valid.
658
+
659
+
[ReadWriteOncePod will map to access mode `UNKNOWN`]: https://github.com/kubernetes/kubernetes/blob/v1.21.0/pkg/volume/csi/csi_client.go#L512
660
+
[error when supplied an unsupported access mode]: https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/v1.0.0/pkg/driver/controller.go#L117-L122
661
+
[won't check the supplied access modes]: https://github.com/kubernetes-csi/csi-test/blob/v4.2.0/mock/service/controller.go#L44-L46
662
+
["If ANY of the specified volume capabilities are not supported by the SP, the call MUST return the appropriate gRPC error code"]: https://github.com/container-storage-interface/spec/blob/v1.4.0/spec.md#createvolume
663
+
664
+
#### API Server Version N / Scheduler Version N-1 / Kubelet Version N-1 or N-2
665
+
666
+
When creating a pod using ReadWriteOncePod, the scheduler will not enforce this
667
+
access mode during scheduling. It will be possible for two pods using the same
668
+
PVC with this access mode to be assigned the same node.
669
+
670
+
Same as the above case, with an older kubelet ReadWriteOncePod will map to
671
+
access mode `UNKNOWN`. How this access mode is used will vary across CSI
672
+
drivers.
673
+
674
+
#### API Understands ReadWriteOncePod, CSI Sidecars Do Not
675
+
676
+
Both the the [CSI attacher] and the [CSI resizer] will error if they do not
677
+
understand ReadWriteOncePod and this access mode is used on a PV.
678
+
679
+
The CSI provisioner will [map ReadWriteOncePod to a nil access mode]. How this
0 commit comments