Skip to content

Commit e0d5e82

Browse files
committed
Removed VolumeStatsHealthMessage from metrics API
1 parent 81babc9 commit e0d5e82

File tree

1 file changed

+6
-12
lines changed
  • keps/sig-storage/1432-volume-health-monitor

1 file changed

+6
-12
lines changed

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

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ The volume health monitoring by Kubelet will be controlled by a new feature gate
145145

146146
### Kubelet Metrics changes
147147

148-
Add two new fields in the [VolumeStats metrics API](https://github.com/kubernetes/kubernetes/blob/v1.22.1/staging/src/k8s.io/kubelet/pkg/apis/stats/v1alpha1/types.go#L263).
148+
Add a new field in the [VolumeStats metrics API](https://github.com/kubernetes/kubernetes/blob/v1.22.1/staging/src/k8s.io/kubelet/pkg/apis/stats/v1alpha1/types.go#L263).
149149

150150
```
151151
// VolumeStats contains data about Volume filesystem usage.
@@ -164,15 +164,10 @@ type VolumeStats struct {
164164
// An abnormal volume does not meet these criteria.
165165
// +optional
166166
Abnormal *bool `json:"abnormal,omitempty"`
167-
168-
// Note: Add the following new field
169-
// The message describing the condition of the volume.
170-
// +optional
171-
Message *string `json:"message,omitempty"`
172167
}
173168
```
174169

175-
Modify [parsePodVolumeStats](https://github.com/kubernetes/kubernetes/blob/v1.22.1/pkg/kubelet/server/stats/volume_stat_calculator.go#L172) to include the new fields in the returned `stats.VolumeStats`.
170+
Modify [parsePodVolumeStats](https://github.com/kubernetes/kubernetes/blob/v1.22.1/pkg/kubelet/server/stats/volume_stat_calculator.go#L172) to include the new field in the returned `stats.VolumeStats`.
176171

177172
The newly added Volume Health stats will be stored in [persistentStats](https://github.com/kubernetes/kubernetes/blob/v1.22.1/pkg/kubelet/server/stats/volume_stat_calculator.go#L168).
178173

@@ -182,12 +177,11 @@ Add new metrics [here](https://github.com/kubernetes/kubernetes/blob/v1.22.1/pkg
182177

183178
```
184179
VolumeStatsHealthAbnormal = "volume_stats_health_abnormal"
185-
VolumeStatsHealthMessage = "volume_stats_health_message"
186180
```
187181

188182
Update [CollectWithStability](https://github.com/kubernetes/kubernetes/blob/v1.22.1/pkg/kubelet/metrics/collectors/volume_stats.go#L117) to add a [NewLazyConstMetric](https://github.com/kubernetes/component-base/blob/v0.22.1/metrics/value.go#L33) with an [GaugeValue](https://github.com/kubernetes/component-base/blob/v0.22.1/metrics/value.go#L32).
189183

190-
Since Prometheus does not store string metrics, `VolumeStatsHealthAbnormal` will be stored as either 1 or 0 and `VolumeStatsHealthMessage` will be added as a label in the same metric named `VolumeStatsHealthAbnormal`.
184+
Since Prometheus does not store string metrics, `VolumeStatsHealthAbnormal` will be stored as either 1 or 0.
191185

192186
### CSI changes
193187

@@ -911,13 +905,13 @@ previous answers based on experience in the field._
911905
call is needed.
912906
- API calls that may be triggered by changes of some Kubernetes resources
913907
(e.g. update of object X triggers new updates of object Y)
914-
We are adding new `Abnormal` and `Message` fields to the existing Kubelet metrics API. It will be retrieved by the periodic metrics collection call. We are not changing the existing frequency of that call.
908+
We are adding a new `Abnormal` field to the existing Kubelet metrics API. It will be retrieved by the periodic metrics collection call. We are not changing the existing frequency of that call.
915909
- periodic API calls to reconcile state (e.g. periodic fetching state,
916910
heartbeats, leader election, etc.)
917911

918912
* **Will enabling / using this feature result in introducing new API types?**
919913
Describe them, providing:
920-
- API type: Adding 'Abnormal` and `Message` fields to Kubelet VolumeStats metrics API
914+
- API type: Adding 'Abnormal` field to Kubelet VolumeStats metrics API
921915
- Supported number of objects per cluster: No
922916
- Supported number of objects per namespace (for namespace-scoped objects): No
923917

@@ -928,7 +922,7 @@ provider?**
928922
* **Will enabling / using this feature result in increasing size or count of
929923
the existing API objects?**
930924
Describe them, providing:
931-
- API type(s): Yes. We are adding new 'Abnormal` and `Message` fields to Kubelet VolumeStats metrics API.
925+
- API type(s): Yes. We are adding new 'Abnormal` field to Kubelet VolumeStats metrics API.
932926
- Estimated increase in size: (e.g., new annotation of size 32B):
933927
New string of max length of 128 bytes; new int of 4 bytes.
934928
- Estimated amount of new objects: (e.g., new Object X for every existing Pod)

0 commit comments

Comments
 (0)