Commit graph

7322 commits

Author SHA1 Message Date
kubernetes-prow[bot]
af497196d0
Merge pull request #139918 from somak2kai/minor_change_fix_structural_outlier_beats
CronJob controller: processNextWorkItem does not call queue.Forget on the (nil, nil) sync path, leaving stale rate-limiter backoff count
2026-06-25 14:54:21 +00:00
kubernetes-prow[bot]
11be22f91b
Merge pull request #139264 from omerap12/refactor-horizontal-test-01
refactor horizontal tests scaleUpCpu
2026-06-25 11:14:22 +00:00
kubernetes-prow[bot]
3d7116c89e
Merge pull request #139990 from krishhna24/devicetainteviction-event-handler
devicetainteviction: use AddEventHandlerWithOptions
2026-06-24 21:34:55 +00:00
kubernetes-prow[bot]
554d3b1452
Merge pull request #137964 from niewysoki/add-monitor-nodes-workers-to-ccm
Introduce paralellization for MonitorNodes loop.
2026-06-24 21:34:27 +00:00
kubernetes-prow[bot]
6abaca5f3a
Merge pull request #139898 from omerap12/refactor-utilization-test
hpa: refactor utilization test
2026-06-24 18:20:19 +00:00
krishhna24
3787ee098c devicetainteviction: use AddEventHandlerWithOptions
Migrate the claim, pod, DeviceTaintRule, and ResourceSlice informer
event handlers from AddEventHandler to AddEventHandlerWithOptions,
passing the controller's contextual logger via cache.HandlerOptions.
This routes event-handler logging through the per-controller logger
instead of the global klog.Background(), matching the pattern already
used by the sibling resourceclaim controller.

The change is non-behavioral: the returned registration handles are
retained for HasSyncedChecker and RemoveEventHandler as before.
2026-06-24 13:09:38 +00:00
Franciszek Hnatów
4777f80306 Isolate CloudNodeLifecycleController configuration into specific component config
Moved the CloudNodeLifecycleController configuration fields out of the
KubeCloudSharedConfiguration, and created a dedicated component-specific
config package. Also moved the node-monitor-period, while keeping the
old flag (with deprecation message). No new flag for node-monitor-period
was added, due to
https://kubernetes.io/docs/reference/using-api/deprecation-policy/#deprecating-a-flag-or-cli-argument.
2026-06-22 18:55:54 +00:00
somak2kai
e794e78634
CronJob controller: processNextWorkItem does not call queue.Forget on the nil, nil
processNextWorkItem only resets the workqueue rate limiter (queue.Forget) inside the requeueAfter != nil branch. When sync() returns (nil, nil) — no error and no requeue,  rate limit is not reset.
2026-06-22 18:55:18 +05:30
Johannes Würbach
7a33246d94
Promote HPAScaleToZero feature gate to beta
Graduate the HPAScaleToZero feature gate to beta, enabled by default, for
v1.37 per KEP-2021. Regenerate the feature gate reference lists.
2026-06-22 10:21:04 +02:00
Omer Aplatony
2655d169a8
hpa: refactor utilization test
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2026-06-21 16:19:20 +03:00
Omer Aplatony
6d604a635b
refactor horizontal tests scaleUpCpu
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2026-06-21 15:35:19 +03:00
Kubernetes Prow Robot
c2cd34a6ed
Merge pull request #139457 from akhilsingh-git/fix/job-controller-active-count-backoff-139428
Fix job controller reporting active=0 during pod creation backoff
2026-06-11 11:34:41 +05:30
Kubernetes Prow Robot
70576e5dee
Merge pull request #139443 from omerap12/cleanup-hpa-cs
cleanup hpa consistency store
2026-06-11 01:50:01 +05:30
Akhil Singh
2fe49b0cd0 Fix job controller reporting active=0 during pod creation backoff
When manageJob() needs to create replacement pods but defers creation
because a pod-failure backoff is still active, it returned a hardcoded
active=0 to the caller. Because no pods were actually created or deleted,
this left Status.Active=0 while Status.Ready still reflected the running
pods. The apiserver correctly rejects such updates ("cannot set more
ready pods than active") with a 422, which blocks flushing uncounted
terminated pods, removing finalizers, and updating job status, leaving
pods stuck Terminating with stale status.

Return the real active count from both backoff early-returns instead,
since the deferral does not change the number of active pods.

Issue: https://github.com/kubernetes/kubernetes/issues/139428
2026-06-09 18:55:28 +05:30
yliao
f8e92a5b5e fixed unit tests errors: cannot set feature gate DRAExtendedResource to false, feature is locked to true 2026-06-02 16:12:22 +00:00
Omer Aplatony
4b95fff618
cleanup hpa consistency store
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2026-06-02 17:00:11 +03:00
Kubernetes Prow Robot
704d4840d0
Merge pull request #138887 from soltysh/replace_failed_pods
Simplify onlyReplaceFailedPods method
2026-05-26 01:15:14 +05:30
Kubernetes Prow Robot
901087fb35
Merge pull request #138572 from dom4ha/promote-workload-api-v1alpha3
Converts the DisruptionMode enum field to struct as v1alpha3 and drops v1alpha2
2026-05-23 00:04:52 +05:30
dom4ha
88948acc38 Remove v1alpha2 API definitions
Update client-go lister and informer imports to v1alpha3
2026-05-22 12:50:19 +00:00
dom4ha
8a52fb2ea9 Migrate references to v1alpha3 in tests, controllers, and remaining files 2026-05-22 12:50:19 +00:00
Omer Aplatony
93a2605ee3 removed runTest from replica calculator test
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2026-05-20 18:33:40 +00:00
Kubernetes Prow Robot
ad8c9819a2
Merge pull request #139061 from omerap12/refactor-replica-calc-test
HPA: refactor replica_calculator_test: consolidate metric case tests
2026-05-20 20:31:54 +05:30
Kubernetes Prow Robot
1bb07fcb35
Merge pull request #138736 from rahulbabu95/fix/endpoint-controller-ipfamilies-guard
fix: avoid panic on services with empty IPFamilies
2026-05-20 17:13:45 +05:30
Kubernetes Prow Robot
ae2febc8b5
Merge pull request #138995 from soltysh/speedup_sts_tests
Speed up StatefulSet unit tests
2026-05-19 15:33:08 +05:30
Maciej Szulik
7213a2099b
Move various one-time testFn inline
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2026-05-19 10:56:35 +02:00
Maciej Szulik
5cf02ebbcc
Use fakeclock in all tests
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2026-05-19 10:39:17 +02:00
Maciej Szulik
4993d95630
Speed up StatefulSet unit tests
TestStatefulSetScaleDownRespectsMinReadySeconds and
TestStatefulSetOnDeleteStrategyIgnoresMinReadySeconds are testing
.spec.minReadySeconds. This resulted in tests spinning sufficiently long
to reach the desired value. In both cases it was set to 30s.
This change modifies scaleUpStatefulSetControl allowing to inject
fakeClock which allows faster time changes, thus speeding the tests.

Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2026-05-19 10:15:30 +02:00
Mike Fedosin
86f94fda0c
Fix error formatting and use proper error wrapping in HPA controller (#139029)
* Fix format-string argument order in object metric error messages

The error format strings in GetObjectMetricReplicas and
GetObjectPerPodMetricReplicas had the arguments in the wrong order,
causing objectRef.Kind to be printed where the error should appear
and vice versa.

Signed-off-by: Mikhail Fedosin <mfedosin@redhat.com>

* Use %w for error wrapping in fmt.Errorf calls in podautoscaler

Replace %v with %w for error arguments in fmt.Errorf throughout the
HPA controller, replica calculator, and metrics client. This enables
proper error wrapping so that callers can use errors.Is and errors.As
to inspect underlying errors.

Signed-off-by: Mikhail Fedosin <mfedosin@redhat.com>

---------

Signed-off-by: Mikhail Fedosin <mfedosin@redhat.com>
2026-05-18 20:47:54 +05:30
Kubernetes Prow Robot
a4aee62c39
Merge pull request #139025 from omerap12/hpaConsistency
Add the ability for the hpa controller to read its own writes
2026-05-18 19:56:02 +05:30
Kubernetes Prow Robot
1619326c6a
Merge pull request #138981 from gnufied/implement-optimized-selinux-metric-emission
Improve performance characteristic of selinux metric emission
2026-05-18 16:53:51 +05:30
Kubernetes Prow Robot
96c348e943
Merge pull request #138837 from mattcary/multi-msg
Clarify multi-attach events
2026-05-18 15:47:59 +05:30
Hemant Kumar
f02ddd0e3b Only emit non-dupicated values as metrics 2026-05-15 11:40:56 -04:00
Kubernetes Prow Robot
016a2bcfa4
Merge pull request #138481 from carlory/fix-broken-graceful-leader-transition
controller/resourcepoolstatusrequest: Improve goroutine mgmt
2026-05-15 20:22:30 +05:30
Hemant Kumar
dfc9d96007 Optimize how deletions are handled 2026-05-15 00:05:01 -04:00
Omer Aplatony
09b3daa521 refactor replica_calculator_test: consolidate metric case tests
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2026-05-14 15:24:56 +00:00
Kubernetes Prow Robot
f39965b62c
Merge pull request #138858 from omerap12/refactor-TestReplicasCalcResourceScale
HPA: refactor replica_calculator_test GetResourceReplicas
2026-05-14 14:36:28 +05:30
Omer Aplatony
9b2b31c3c5 Add the ability for the hpa controller to read its own writes
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2026-05-14 08:34:39 +00:00
Omer Aplatony
41d10bc9e0 refactor replica_calculator_test GetResourceReplicas
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2026-05-14 08:11:10 +00:00
Jordan Liggitt
bed4a34ad8
Drop meaningless ,inline from json tags 2026-05-13 11:24:04 -04:00
Kubernetes Prow Robot
553312e6c2
Merge pull request #138657 from jpbetz/codegen-discovery
Enable validation-gen for all existing and future APIs
2026-05-13 01:16:37 +05:30
Joe Betz
9d65aeabb6
Explicitly disable validation-gen where not needed 2026-05-12 12:49:01 -04:00
Hemant Kumar
9047f71b70 Improve performance characteristic of selinux metric emission 2026-05-11 21:51:40 -04:00
Joe Betz
119a1460c1
Generate deepcopy 2026-05-11 12:27:56 -04:00
Patrick Ohly
4a305f8fc7 DRA: fix component list for ResourceClaim metric
The endpoint-mappings.yaml file specifies which components use which
metrics. The case some, but not all core components (kube-controller-manager
and kube-scheduler in this case) sharing the same metrics was not
supported. This gets fixed by not returning early once the first file path
matches.

Not all metrics in pkg/controller/resourceclaim/metrics are shared. To make the
sharing clearer and fit into the file-path based component support in
endpoint-mappings.yaml, the shared metric gets moved to a new
pkg/resourceclaim/metrics package.
2026-05-11 12:31:45 +02:00
Patrick Ohly
341b7d65b6 DRA: harmonize ResourceClaim creation metric
Both kube-controller-manager and kube-scheduler create ResourceClaims. Using
the same metric (sub-system: "dynamic_resource_allocation", name:
"resourceclaim_creates_total") in both components simplifies aggregation across
the entire cluster.
2026-05-11 12:15:14 +02:00
Kubernetes Prow Robot
63b36867dd
Merge pull request #138016 from pacoxu/fix-ut-pod-group
fix PodGroup protection test flake by waiting for pod watch before delete
2026-05-11 07:01:46 +05:30
Davanum Srinivas
cacb333aad
Update pkg/controller/scheduling/podgroupprotection/podgroup_protection_controller_test.go
Co-authored-by: Ania Borowiec <anias@google.com>
2026-05-10 20:38:25 -04:00
Kubernetes Prow Robot
692d9f21dd
Merge pull request #138907 from Jefftree/remove-locked-apimachinery-feature-gates
Remove locked GA feature gates (sig-api-machinery)
2026-05-09 01:57:18 +05:30
Jefftree
dfa449fabf Remove locked GA feature gate OrderedNamespaceDeletion 2026-05-08 14:15:45 -04:00
Maciej Szulik
66c38f69b8
Simplify onlyReplaceFailedPods method
In our defaulting code we ensure that PodReplacementPolicy is set, its
value will depend on PodFailurePolicy being set or not, but we can
safely assume it's set. Thus the method onlyReplaceFailedPods is
sufficient to only verify PodReplacementPolicy and its value.

Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2026-05-08 11:13:23 +02:00