@@ -376,9 +376,9 @@ proposal will be implemented, this is the place to discuss them.
376
376
377
377
In Kubernetes, we should add a new ReadWriteOncePod persistent volume access
378
378
mode to PersistentVolumes and PersistentVolumeClaims. This change will require
379
- adding a feature gate to the kube-apiserver, kube-controller-manager,
380
- kube-scheduler, and kubelet. Validation logic will need updating to accept this
381
- access mode type if the feature gate is enabled.
379
+ adding a feature gate to the kube-apiserver, kube-scheduler, and kubelet.
380
+ Validation logic will need updating to accept this access mode type if the
381
+ feature gate is enabled.
382
382
383
383
``` golang
384
384
// can be mounted read/write mode to exactly 1 pod
@@ -391,7 +391,7 @@ This access mode will be enforced in two places:
391
391
392
392
First is at the time a pod is scheduled. When scheduling a pod, if another pod
393
393
is found using the same PVC and the PVC uses ReadWriteOncePod, then scheduling
394
- will fail and the pod will be considered unresolvable .
394
+ will fail and the pod will be considered UnschedulableAndUnresolvable .
395
395
396
396
In order to determine if a pod using a ReadWriteOncePod PVC can be scheduled, we
397
397
need to enumerate all pods and check if any are already consuming this PVC. This
@@ -402,7 +402,7 @@ The [node info cache] will be extended to map the PVC name to a reference count
402
402
for the PVC. In the PreFilter extension point, if the pod's PVC is using
403
403
ReadWriteOncePod, we will query this map for each node checking for references
404
404
to the scheduled pod's PVC. If one is found the pod will fail scheduling and be
405
- marked unresolvable .
405
+ marked UnschedulableAndUnresolvable .
406
406
407
407
[ volume restrictions plugin ] : https://github.com/kubernetes/kubernetes/blob/v1.21.0/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go#L29
408
408
[ node info cache ] : https://github.com/kubernetes/kubernetes/blob/v1.21.0/pkg/scheduler/framework/types.go#L357
@@ -601,6 +601,8 @@ in back-to-back releases.
601
601
602
602
#### Beta
603
603
604
+ - Scheduler enforces ReadWriteOncePod access mode by marking pods as
605
+ Unschedulable, preemption logic added
604
606
- ReadWriteOncePod access mode has end to end test coverage
605
607
- Mock CSI driver supports ` SINGLE_NODE_*_WRITER ` access modes, relevant end to
606
608
end tests updated to use this driver
@@ -627,10 +629,9 @@ enhancement:
627
629
-->
628
630
629
631
In order to upgrade a cluster to use this feature, the user will need to restart
630
- the kube-apiserver, kube-controller-manager, kube-scheduler, and kubelet with
631
- the ReadWriteOncePod feature gate enabled. Additionally they will need to
632
- update their CSI drivers and sidecars to versions that depend on the new
633
- Kubernetes API and CSI spec.
632
+ the kube-apiserver, kube-scheduler, and kubelet with the ReadWriteOncePod
633
+ feature gate enabled. Additionally they will need to update their CSI drivers
634
+ and sidecars to versions that depend on the new Kubernetes API and CSI spec.
634
635
635
636
When downgrading a cluster to disable this feature, the user will need to
636
637
restart the kube-apiserver with the ReadWriteOncePod feature gate disabled. When
@@ -755,7 +756,6 @@ Pick one of these and delete the rest.
755
756
- Feature gate name: ReadWriteOncePod
756
757
- Components depending on the feature gate:
757
758
- kube-apiserver
758
- - kube-controller-manager
759
759
- kube-scheduler
760
760
- kubelet
761
761
0 commit comments