Skip to content

Commit

Permalink
Add a plan of using CSI driver registry
Browse files Browse the repository at this point in the history
We can also use #2514
when it becomes available.
  • Loading branch information
gnufied committed Aug 15, 2018
1 parent e1cb861 commit 1ca2366
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion contributors/design-proposals/storage/dynamic_volume_limit.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ For Kubernetes 1.12, we are adding support for CSI and moving the feature to bet

#### CSI support

A new function of will be added to `pkg/volume/util/attach_limit.go` which will return CSI attach limit
A new function will be added to `pkg/volume/util/attach_limit.go` which will return CSI attach limit
resource name.

The interface of function will be:
Expand Down Expand Up @@ -134,6 +134,17 @@ func GetCSIAttachLimitKey(driverName string) string {
This function will be used both on node and scheduler for determining CSI attach limit key.The value of the
limit will be retrieved using `GetNodeInfo` CSI RPC call and set if non-zero.

**Other options**
Alternately we also considered storing attach limit resource name in `CSIDriver` introduced as part
of https://github.com/kubernetes/community/pull/2514 proposal.

This will work but depends on acceptance of proposal. We can always migrate attach limit resource names to
values defined in `CSIDriver` object in later release. If `CSIDriver` object is available and has a attach limit key,
then kubelet could use that key otherwise it will fallback to `GetCSIAttachLimitKey`.

Scheduler can also check presence of `CSIDriver` object and corresponding key in node object, otherwise it will
fallback to using `GetCSIAttachLimitKey` function.

##### Changes to scheduler

To support attachable limit for CSI, a new predicate called `CSIMaxVolumeLimitChecker` will be added. It will use `GetCSIAttachLimitKey`
Expand Down

0 comments on commit 1ca2366

Please sign in to comment.