kubernetes/pkg/controller
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
..
apis/config Merge pull request #127655 from guozheng-shen/remove-usage 2025-06-24 09:54:28 -07:00
bootstrap Change WaitForNamedCacheSync to WaitForNamedCacheSyncWithContext. 2025-09-05 18:49:31 +00:00
certificates Change WaitForNamedCacheSync to WaitForNamedCacheSyncWithContext. 2025-09-05 18:49:31 +00:00
clusterroleaggregation Change WaitForNamedCacheSync to WaitForNamedCacheSyncWithContext. 2025-09-05 18:49:31 +00:00
cronjob Change WaitForNamedCacheSync to WaitForNamedCacheSyncWithContext. 2025-09-05 18:49:31 +00:00
daemon Change WaitForNamedCacheSync to WaitForNamedCacheSyncWithContext. 2025-09-05 18:49:31 +00:00
deployment Change WaitForNamedCacheSync to WaitForNamedCacheSyncWithContext. 2025-09-05 18:49:31 +00:00
devicetainteviction KEP 5075: implement scheduler 2025-07-30 09:52:49 +09:00
disruption Change WaitForNamedCacheSync to WaitForNamedCacheSyncWithContext. 2025-09-05 18:49:31 +00:00
endpoint Change WaitForNamedCacheSync to WaitForNamedCacheSyncWithContext. 2025-09-05 18:49:31 +00:00
endpointslice Change WaitForNamedCacheSync to WaitForNamedCacheSyncWithContext. 2025-09-05 18:49:31 +00:00
endpointslicemirroring Change WaitForNamedCacheSync to WaitForNamedCacheSyncWithContext. 2025-09-05 18:49:31 +00:00
garbagecollector Merge pull request #133985 from aditigupta96/api-waitfornamedcachesync-with-context 2025-09-16 17:18:09 -07:00
history chore: depr. pointer pkg replacement for pkg/controller 2025-07-07 13:22:36 +02:00
job Merge pull request #133985 from aditigupta96/api-waitfornamedcachesync-with-context 2025-09-16 17:18:09 -07:00
namespace Replace WaitForNamedCacheSync with WaitForNamedCacheSyncWithContext in pkg/controller/ 2025-09-16 14:51:34 -07:00
nodeipam Refine logging levels in Job, IPAM, and ReplicaSet controllers. 2025-03-11 10:25:16 +02:00
nodelifecycle chore: depr. pointer pkg replacement for pkg/controller 2025-07-07 13:22:36 +02:00
podautoscaler Merge pull request #134022 from aditigupta96/cleanup-waitfornamedcachesync 2025-09-16 17:18:16 -07:00
podgc Replace WaitForNamedCacheSync with WaitForNamedCacheSyncWithContext in pkg/controller/ 2025-09-16 14:51:34 -07:00
replicaset Replace WaitForNamedCacheSync with WaitForNamedCacheSyncWithContext in pkg/controller/ 2025-09-16 14:51:34 -07:00
replication disable terminatingReplicas reconciliation in ReplicationController 2025-05-30 21:08:12 +02:00
resourceclaim Replace WaitForNamedCacheSync with WaitForNamedCacheSyncWithContext in pkg/controller/ 2025-09-16 14:51:34 -07:00
resourcequota Merge pull request #134022 from aditigupta96/cleanup-waitfornamedcachesync 2025-09-16 17:18:16 -07:00
serviceaccount Replace WaitForNamedCacheSync with WaitForNamedCacheSyncWithContext in pkg/controller/ 2025-09-16 14:51:34 -07:00
servicecidrs Replace WaitForNamedCacheSync with WaitForNamedCacheSyncWithContext in pkg/controller/ 2025-09-16 14:51:34 -07:00
statefulset Adding metrics for Maxunavailable feature in StatefulSet (#130951) 2025-09-17 05:34:14 -07:00
storageversiongc chore: depr. pointer pkg replacement for pkg/controller 2025-07-07 13:13:39 +02:00
storageversionmigrator Merge pull request #133985 from aditigupta96/api-waitfornamedcachesync-with-context 2025-09-16 17:18:09 -07:00
tainteviction Replace WaitForNamedCacheSync with WaitForNamedCacheSyncWithContext in pkg/controller/ 2025-09-16 14:51:34 -07:00
testutil Use canonical json-patch v4 import 2024-05-28 10:48:22 +02:00
ttl Replace WaitForNamedCacheSync with WaitForNamedCacheSyncWithContext in pkg/controller/ 2025-09-16 14:51:34 -07:00
ttlafterfinished Replace WaitForNamedCacheSync with WaitForNamedCacheSyncWithContext in pkg/controller/ 2025-09-16 14:51:34 -07:00
util Fix Go vet errors for master golang 2024-09-20 12:36:38 +05:30
validatingadmissionpolicystatus Replace WaitForNamedCacheSync with WaitForNamedCacheSyncWithContext in pkg/controller/ 2025-09-16 14:51:34 -07:00
volume Replace WaitForNamedCacheSync with WaitForNamedCacheSyncWithContext in pkg/controller/ 2025-09-16 14:51:34 -07:00
controller_ref_manager.go kube-controller-manager: finish conversion to contextual logging 2023-07-12 14:57:29 +02:00
controller_ref_manager_test.go Merge pull request #101250 from evertrain/master 2021-11-10 09:19:26 -08:00
controller_utils.go schedule pod availability checks at the correct time in ReplicaSets 2025-07-23 18:58:57 +02:00
controller_utils_test.go schedule pod availability checks at the correct time in ReplicaSets 2025-07-23 18:58:57 +02:00
doc.go remove import doc comments 2024-12-02 16:59:34 +01:00
OWNERS Add jefftree to OWNERS 2025-08-04 19:12:13 +00:00