Skip to content

Commit 398fb53

Browse files
authored
Merge pull request #49918 from torredil/dev-1.33
Add docs for KEP-4876: Mutable CSINode Allocatable Property
2 parents 9fea4ed + 178ce42 commit 398fb53

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

content/en/docs/concepts/storage/storage-limits.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,33 @@ Refer to the [CSI specifications](https://github.com/container-storage-interface
7979

8080
* For volumes managed by in-tree plugins that have been migrated to a CSI driver, the maximum number of volumes will be the one reported by the CSI driver.
8181

82+
### Mutable CSI Node Allocatable Count
83+
84+
{{< feature-state state="alpha" for_k8s_version="v1.33" >}}
85+
86+
CSI drivers can dynamically adjust the maximum number of volumes that can be attached to a Node at runtime. This enhances scheduling accuracy and reduces pod scheduling failures due to changes in resource availability.
87+
88+
This is an alpha feature and is disabled by default.
89+
90+
To use this feature, you must enable the `MutableCSINodeAllocatableCount` feature gate on the following components:
91+
92+
- `kube-apiserver`
93+
- `kubelet`
94+
95+
#### Periodic Updates
96+
97+
When enabled, CSI drivers can request periodic updates to their volume limits by setting the `nodeAllocatableUpdatePeriodSeconds` field in the `CSIDriver` specification. For example:
98+
99+
```yaml
100+
apiVersion: storage.k8s.io/v1
101+
kind: CSIDriver
102+
metadata:
103+
name: hostpath.csi.k8s.io
104+
spec:
105+
nodeAllocatableUpdatePeriodSeconds: 60
106+
```
107+
108+
Kubelet will periodically call the corresponding CSI driver’s `NodeGetInfo` endpoint to refresh the maximum number of attachable volumes, using the interval specified in `nodeAllocatableUpdatePeriodSeconds`. The minimum allowed value for this field is 10 seconds.
109+
110+
Additionally, if a volume attachment operation fails with a `ResourceExhausted` error (gRPC code 8), Kubernetes triggers an immediate update to the allocatable volume count for that Node.
82111

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: MutableCSINodeAllocatableCount
3+
content_type: feature_gate
4+
_build:
5+
list: never
6+
render: false
7+
8+
stages:
9+
- stage: alpha
10+
defaultValue: false
11+
fromVersion: "1.33"
12+
---
13+
When this feature gate is enabled, the `CSINode.Spec.Drivers[*].Allocatable.Count` field becomes mutable, and a new field, `NodeAllocatableUpdatePeriodSeconds`, is available in the `CSIDriver` object. This allows periodic updates to a node's reported allocatable volume capacity, preventing stateful pods from becoming stuck due to outdated information that `kube-scheduler` relies on.

0 commit comments

Comments
 (0)