File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
keps/sig-storage/1432-volume-health-monitor Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -160,10 +160,16 @@ type VolumeStats struct {
160
160
PVCRef *PVCReference `json:"pvcRef,omitempty"`
161
161
162
162
// Note: Add the following new field
163
- // Normal volumes are available for use and operating optimally.
164
- // An abnormal volume does not meet these criteria.
165
163
// +optional
166
- Abnormal *bool `json:"abnormal,omitempty"`
164
+ // VolumeHealthStats contains data about volume health
165
+ VolumeHealthStats `json:"volumeHealthStats,omitempty"`
166
+ }
167
+
168
+ // VolumeHealthStats contains data about volume health.
169
+ type VolumeHealthStats struct {
170
+ // Normal volumes are available for use and operating optimally.
171
+ // An abnormal volume does not meet these criteria.
172
+ Abnormal bool `json:"abnormal,omitempty"`
167
173
}
168
174
```
169
175
@@ -183,6 +189,14 @@ Update [CollectWithStability](https://github.com/kubernetes/kubernetes/blob/v1.2
183
189
184
190
Since Prometheus does not store string metrics, ` VolumeStatsHealthAbnormal ` will be stored as either 1 or 0.
185
191
192
+ PVC's namespace and name will be the label as in the following example:
193
+ https://github.com/kubernetes/kubernetes/blob/v1.22.1/pkg/kubelet/metrics/collectors/volume_stats.go#L97
194
+
195
+ An example metric:
196
+ ```
197
+ kubelet_volume_stats_health_abnormal{namespace="testns",persistentvolumeclaim="testpvc"} 1
198
+ ```
199
+
186
200
### CSI changes
187
201
188
202
Container Storage Interface (CSI) specification will be modified to provide volume health check leveraging existing RPCs and adding new ones.
You can’t perform that action at this time.
0 commit comments