From 1ca23668a8cba5acfd0b09f488ce560bab2b2335 Mon Sep 17 00:00:00 2001 From: Hemant Kumar Date: Wed, 15 Aug 2018 15:24:22 -0400 Subject: [PATCH] Add a plan of using CSI driver registry We can also use https://github.com/kubernetes/community/pull/2514 when it becomes available. --- .../storage/dynamic_volume_limit.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/contributors/design-proposals/storage/dynamic_volume_limit.md b/contributors/design-proposals/storage/dynamic_volume_limit.md index 397e6aa82b1..e272246e050 100644 --- a/contributors/design-proposals/storage/dynamic_volume_limit.md +++ b/contributors/design-proposals/storage/dynamic_volume_limit.md @@ -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: @@ -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`