Skip to content

Commit 8807ad4

Browse files
committed
Add a VolumeHealthStats struct.
1 parent e0d5e82 commit 8807ad4

File tree

1 file changed

+17
-3
lines changed
  • keps/sig-storage/1432-volume-health-monitor

1 file changed

+17
-3
lines changed

keps/sig-storage/1432-volume-health-monitor/README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,16 @@ type VolumeStats struct {
160160
PVCRef *PVCReference `json:"pvcRef,omitempty"`
161161
162162
// 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.
165163
// +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"`
167173
}
168174
```
169175

@@ -183,6 +189,14 @@ Update [CollectWithStability](https://github.com/kubernetes/kubernetes/blob/v1.2
183189

184190
Since Prometheus does not store string metrics, `VolumeStatsHealthAbnormal` will be stored as either 1 or 0.
185191

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+
186200
### CSI changes
187201

188202
Container Storage Interface (CSI) specification will be modified to provide volume health check leveraging existing RPCs and adding new ones.

0 commit comments

Comments
 (0)