kubernetes/pkg/controller
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
..
apis/config Explicitly disable validation-gen where not needed 2026-05-12 12:49:01 -04:00
bootstrap
certificates Generate deepcopy 2026-05-11 12:27:56 -04:00
clusterroleaggregation
cronjob Generate deepcopy 2026-05-11 12:27:56 -04:00
daemon Generate deepcopy 2026-05-11 12:27:56 -04:00
deployment Generate deepcopy 2026-05-11 12:27:56 -04:00
devicetainteviction Generate deepcopy 2026-05-11 12:27:56 -04:00
disruption Update pkg/controller to use slices.Contains 2026-02-26 10:17:13 +01:00
endpoint Generate deepcopy 2026-05-11 12:27:56 -04:00
endpointslice Generate deepcopy 2026-05-11 12:27:56 -04:00
endpointslicemirroring Generate deepcopy 2026-05-11 12:27:56 -04:00
garbagecollector Drop meaningless ,inline from json tags 2026-05-13 11:24:04 -04:00
history
job Generate deepcopy 2026-05-11 12:27:56 -04:00
namespace Generate deepcopy 2026-05-11 12:27:56 -04:00
nodeipam Generate deepcopy 2026-05-11 12:27:56 -04:00
nodelifecycle Generate deepcopy 2026-05-11 12:27:56 -04:00
podautoscaler Fix error formatting and use proper error wrapping in HPA controller (#139029) 2026-05-18 20:47:54 +05:30
podgc Generate deepcopy 2026-05-11 12:27:56 -04:00
replicaset Generate deepcopy 2026-05-11 12:27:56 -04:00
replication Generate deepcopy 2026-05-11 12:27:56 -04:00
resourceclaim Merge pull request #138657 from jpbetz/codegen-discovery 2026-05-13 01:16:37 +05:30
resourcepoolstatusrequest controller/resourcepoolstatusrequest: Improve goroutine mgmt 2026-04-20 18:28:14 +08:00
resourcequota Generate deepcopy 2026-05-11 12:27:56 -04:00
scheduling/podgroupprotection Update pkg/controller/scheduling/podgroupprotection/podgroup_protection_controller_test.go 2026-05-10 20:38:25 -04:00
serviceaccount Generate deepcopy 2026-05-11 12:27:56 -04:00
servicecidrs Update pkg/controller to use slices.Contains 2026-02-26 10:17:13 +01:00
statefulset Generate deepcopy 2026-05-11 12:27:56 -04:00
storageversiongc
storageversionmigrator Drop meaningless ,inline from json tags 2026-05-13 11:24:04 -04:00
tainteviction
testutil
ttl
ttlafterfinished Generate deepcopy 2026-05-11 12:27:56 -04:00
util move protectionutil pkg to controller/util 2026-03-18 15:27:56 +00:00
validatingadmissionpolicystatus Generate deepcopy 2026-05-11 12:27:56 -04:00
volume Merge pull request #138981 from gnufied/implement-optimized-selinux-metric-emission 2026-05-18 16:53:51 +05:30
controller_ref_manager.go
controller_ref_manager_test.go
controller_utils.go Drop LogarithmicScaleDown after the feature GA-ed in 1.31 2026-05-04 16:27:43 +02:00
controller_utils_test.go Drop LogarithmicScaleDown after the feature GA-ed in 1.31 2026-05-04 16:27:43 +02:00
doc.go
OWNERS