kubernetes/pkg/controller/statefulset
Edwin Hernandez fa9071302f
Adding metrics for Maxunavailable feature in StatefulSet (#130951)
* adding maxunavailable_violation metric

added metric to list of stable metrics

changed when metric gets incremented

addressed comments

fixed stable metrics list

* Update pkg/controller/statefulset/metrics/metrics.go

Co-authored-by: Filip Křepinský <fkrepins@redhat.com>

* Update the metric and log verbosity level

* Address false positives metric count

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* Implement maxUnavailable and UnavailableReplicas metrics

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* fix lint fmt

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* update tests

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* se metrics to 1 as a default

* log for true validation only and update func sig.

* Move maxUnavailable metric to the updateStatefulSetStatus

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* change metrics stability level to Alpha

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* fix unit test

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* fix linting issue

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

* Address code review feedback

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>

---------

Signed-off-by: Heba Elayoty <heelayot@microsoft.com>
Co-authored-by: Filip Křepinský <fkrepins@redhat.com>
Co-authored-by: Heba Elayoty <heelayot@microsoft.com>
2025-09-17 05:34:14 -07:00
..
config remove import doc comments 2024-12-02 16:59:34 +01:00
metrics Adding metrics for Maxunavailable feature in StatefulSet (#130951) 2025-09-17 05:34:14 -07:00
OWNERS Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
stateful_pod_control.go Replace deprecated strings.Title with cases.Title 2025-08-30 18:16:59 +03:00
stateful_pod_control_test.go Drop StatefulSetAutoDeletePVC after the feature GA-ed in 1.32 2025-08-28 13:35:16 +02:00
stateful_set.go Adding metrics for Maxunavailable feature in StatefulSet (#130951) 2025-09-17 05:34:14 -07:00
stateful_set_control.go Adding metrics for Maxunavailable feature in StatefulSet (#130951) 2025-09-17 05:34:14 -07:00
stateful_set_control_test.go Adding metrics for Maxunavailable feature in StatefulSet (#130951) 2025-09-17 05:34:14 -07:00
stateful_set_status_updater.go Wire contexts to Apps controllers 2021-10-13 16:32:13 -04:00
stateful_set_status_updater_test.go Promote minReadySeconds to GA 2022-07-13 11:37:10 -04:00
stateful_set_test.go Adding metrics for Maxunavailable feature in StatefulSet (#130951) 2025-09-17 05:34:14 -07:00
stateful_set_utils.go Drop PodIndexLabel after the feature GA-ed in 1.32 2025-09-11 19:32:48 +02:00
stateful_set_utils_test.go Respect controllers on PVCs for retention policy 2024-06-05 12:06:41 -07:00