Skip to content

Commit

Permalink
Merge pull request #2797 from chrishenzie/2485-changes
Browse files Browse the repository at this point in the history
KEP-2485: Scheduler changes for beta graduation criteria
  • Loading branch information
k8s-ci-robot authored Jun 25, 2021
2 parents e8e0772 + 697d7e7 commit 2d01c7d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
20 changes: 10 additions & 10 deletions keps/sig-storage/2485-read-write-once-pod-pv-access-mode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,9 @@ proposal will be implemented, this is the place to discuss them.

In Kubernetes, we should add a new ReadWriteOncePod persistent volume access
mode to PersistentVolumes and PersistentVolumeClaims. This change will require
adding a feature gate to the kube-apiserver, kube-controller-manager,
kube-scheduler, and kubelet. Validation logic will need updating to accept this
access mode type if the feature gate is enabled.
adding a feature gate to the kube-apiserver, kube-scheduler, and kubelet.
Validation logic will need updating to accept this access mode type if the
feature gate is enabled.

```golang
// can be mounted read/write mode to exactly 1 pod
Expand All @@ -391,7 +391,7 @@ This access mode will be enforced in two places:

First is at the time a pod is scheduled. When scheduling a pod, if another pod
is found using the same PVC and the PVC uses ReadWriteOncePod, then scheduling
will fail and the pod will be considered unresolvable.
will fail and the pod will be considered UnschedulableAndUnresolvable.

In order to determine if a pod using a ReadWriteOncePod PVC can be scheduled, we
need to enumerate all pods and check if any are already consuming this PVC. This
Expand All @@ -402,7 +402,7 @@ The [node info cache] will be extended to map the PVC name to a reference count
for the PVC. In the PreFilter extension point, if the pod's PVC is using
ReadWriteOncePod, we will query this map for each node checking for references
to the scheduled pod's PVC. If one is found the pod will fail scheduling and be
marked unresolvable.
marked UnschedulableAndUnresolvable.

[volume restrictions plugin]: https://github.com/kubernetes/kubernetes/blob/v1.21.0/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go#L29
[node info cache]: https://github.com/kubernetes/kubernetes/blob/v1.21.0/pkg/scheduler/framework/types.go#L357
Expand Down Expand Up @@ -601,6 +601,8 @@ in back-to-back releases.

#### Beta

- Scheduler enforces ReadWriteOncePod access mode by marking pods as
Unschedulable, preemption logic added
- ReadWriteOncePod access mode has end to end test coverage
- Mock CSI driver supports `SINGLE_NODE_*_WRITER` access modes, relevant end to
end tests updated to use this driver
Expand All @@ -627,10 +629,9 @@ enhancement:
-->

In order to upgrade a cluster to use this feature, the user will need to restart
the kube-apiserver, kube-controller-manager, kube-scheduler, and kubelet with
the ReadWriteOncePod feature gate enabled. Additionally they will need to
update their CSI drivers and sidecars to versions that depend on the new
Kubernetes API and CSI spec.
the kube-apiserver, kube-scheduler, and kubelet with the ReadWriteOncePod
feature gate enabled. Additionally they will need to update their CSI drivers
and sidecars to versions that depend on the new Kubernetes API and CSI spec.

When downgrading a cluster to disable this feature, the user will need to
restart the kube-apiserver with the ReadWriteOncePod feature gate disabled. When
Expand Down Expand Up @@ -755,7 +756,6 @@ Pick one of these and delete the rest.
- Feature gate name: ReadWriteOncePod
- Components depending on the feature gate:
- kube-apiserver
- kube-controller-manager
- kube-scheduler
- kubelet

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ feature-gates:
- name: ReadWriteOncePod
components:
- kube-apiserver
- kube-controller-manager
- kube-scheduler
- kubelet
disable-supported: true
Expand Down

0 comments on commit 2d01c7d

Please sign in to comment.