Commit Graph

421 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
586f0fad5c Merge pull request #125046 from tklauser/min-max-builtins
Use Go 1.21 min/max builtins
2025-01-30 07:33:23 -08:00
Adrian Moisey
42a5e5f425 Pass context down to wait.PollUntilContextTimeout 2025-01-07 16:25:55 +02:00
Adrian Moisey
6168143386 Remove use of deprecated functions
Removes use of deprecated functions in k8s.io/utils/pointer and k8s.io/apimachinery/pkg/util/sets
2024-12-31 15:11:38 +02:00
Kubernetes Prow Robot
77749c21f6 Merge pull request #127193 from DP19/ignore-unready-pods-hpa-containermetrics
allow ContainerResource calculations to continue with missing metrics like Resource calculations
2024-12-13 15:18:25 +01:00
Patrick Ohly
8a908e0c0b remove import doc comments
The "// import <path>" comment has been superseded by Go modules.
We don't have to remove them, but doing so has some advantages:

- They are used inconsistently, which is confusing.
- We can then also remove the (currently broken) hack/update-vanity-imports.sh.
- Last but not least, it would be a first step towards avoiding the k8s.io domain.

This commit was generated with
   sed -i -e 's;^package \(.*\) // import.*;package \1;' $(git grep -l '^package.*// import' | grep -v 'vendor/')

Everything was included, except for
   package labels // import k8s.io/kubernetes/pkg/util/labels
because that package is marked as "read-only".
2024-12-02 16:59:34 +01:00
Tobias Klauser
b01b016668 Use Go 1.21 min/max builtins
The `min` and `max` builtins are available since Go 1.21[^1]. The
top-level go.mod file is specifying Go 1.22, so the builtins can be
used.

[^1]: https://go.dev/doc/go1.21#language
2024-10-31 11:17:23 +01:00
David Pait
f97abdbee0 allow ContainerResource calculations to continue with missing metrics like Resource calculations 2024-10-06 11:27:21 -04:00
Matthieu MOREL
f777addb05 fix: use ErrorContains(t, err instead of Contains(t, err.Error()
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-09-26 22:22:20 +02:00
Abhishek Kr Srivastav
95860cff1c Fix Go vet errors for master golang
Co-authored-by: Rajalakshmi-Girish <rajalakshmi.girish1@ibm.com>
Co-authored-by: Abhishek Kr Srivastav <Abhishek.kr.srivastav@ibm.com>
2024-09-20 12:36:38 +05:30
Joe Betz
2595aa1309 generate 2024-09-03 14:26:26 -04:00
Matthieu MOREL
be59afc102 fix: enable testifylint on pkg/controller
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-07-12 06:18:34 +00:00
Kubernetes Prow Robot
2d4514e169 Merge pull request #125802 from mmorel-35/testifylint/len+empty
fix: enable empty and len rules from testifylint on pkg and staging package
2024-07-11 23:12:06 -07:00
Kubernetes Prow Robot
27c6c30905 Merge pull request #124607 from gjtempleton/HPA-Reviewers-Addition
HPA - Add gjtempleton to reviewers
2024-07-10 07:08:50 -07:00
Matthieu MOREL
f014b754fb fix: enable empty and len rules from testifylint on pkg package
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
2024-07-06 23:15:43 +00:00
SataQiu
4bd3baece3 kube-controller-manager: remove the deprecated horizontal-pod-autoscaler-upscale-delay and horizontal-pod-autoscaler-downscale-delay flags 2024-05-19 17:49:23 +08:00
Alvaro Aleman
6d0ac8c561 Use the generic/typed workqueue throughout
This change makes us use the generic workqueue throughout the project in
order to improve type safety and readability of the code.
2024-05-04 14:33:12 -04:00
Guy Templeton
7d540272b8 HPA - Add gjtempleton to reviewers 2024-04-29 09:29:49 +01:00
Claudiu Belu
2be8baeaef unittests: Skip failing Windows tests
Some of the unit tests are currently failing on Windows.

Skip them for now, and remove the skips later, once the underlying issues
have been resolved.
2024-04-25 14:24:16 +00:00
Kubernetes Prow Robot
2ec63e0d28 Merge pull request #123482 from sanposhiho/hpa-containerresource-graduation
graduate HPAContainerMetrics to stable
2024-03-06 17:37:36 -08:00
Mengjiao Liu
b584b87a94 kube-controller-manager: readjust log verbosity
- Increase the global level for broadcaster's logging to 3 so that users can ignore event messages by lowering the logging level. It reduces information noise.
- Making sure the context is properly injected into the broadcaster, this will allow the -v flag value to be used also in that broadcaster, rather than the above global value.
- test: use cancellation from ktesting
- golangci-hints: checked error return value
2024-02-26 14:51:56 +08:00
Kensei Nakada
07e0a80216 graduate HPAContainerMetrics to stable 2024-02-25 00:58:00 +00:00
Kubernetes Prow Robot
99bf6a674c Merge pull request #121039 from josselin-c/master
hpa: always update status metrics when updating the replica count
2023-10-28 19:35:01 +02:00
Kubernetes Prow Robot
2b16f7b6bb Merge pull request #120001 from qingwave/hpa-sidecar
HPA: calculate sidecar container resource in pod autoscaler
2023-10-23 18:39:31 +02:00
Josselin Costanzi
3c4512c6cc hpa: always update status metrics when updating the replica count
Have hpa always update both the metrics and replica count. This fix an
edge case behavior bug where the metrics would not be updated if a
custom metrics was unavailable.
2023-10-06 21:34:09 +00:00
Lukasz Stankiewicz
1b489963c8 Add nil checks for hpa object target type values 2023-10-05 17:15:51 -07:00
qingwave
7f805dc935 fix test name 2023-08-19 03:31:34 +00:00
qingwave
f07a3a3f26 calculate sidecar container resource in pod autoscaler
Signed-off-by: qingwave <isguory@gmail.com>
2023-08-17 07:47:59 +00:00
Kubernetes Prow Robot
0a82bdbfdb Merge pull request #118173 from huiwq1990/feat-autoscale-variable
hpa: cleanup `currentReplicas` code
2023-07-02 23:00:50 -07:00
Kubernetes Prow Robot
52b1247b28 Merge pull request #118232 from luckymrwang/style
style: correct the sentence
2023-06-30 01:51:59 -07:00
Cookie Wang
e2ed8f8c3c style: correct the sentence 2023-05-24 20:24:36 +08:00
huiwq1990
048938f1d8 hpa: cleanup currentReplicas code
Signed-off-by: huiwq1990 <huiwq1990@163.com>
2023-05-22 20:37:49 +08:00
zach593
e3d5feb76c fix HPA plain metric calculate
fix inconsistency in plain metric replica calculator when usageRatio == 1.0, keep same with resource replicas
2023-05-10 11:14:29 +08:00
Guy Templeton
d102a6fea5 HPA Controller - Update Owners
Move josephburnett to emeritus status
2023-04-09 22:44:20 +01:00
Kensei Nakada
543f15d10c HPA: expose the metrics "metric_computation_duration_seconds" and "metric_computation_total" from HPA controller 2023-03-14 22:47:24 +00:00
Kensei Nakada
b49b34c03a HPA: expose the metrics "reconciliations_total" and "reconciliation_duration_seconds" from HPA controller (#116010) 2023-03-14 09:39:42 -07:00
Kubernetes Prow Robot
c237ddb226 Merge pull request #116045 from sanposhiho/sanposhiho/message
fix(HPA): make a difference in SuccessfulRescale  events between the resource metric and the container resource metric
2023-03-13 13:24:47 -07:00
Kensei Nakada
fafbed3b1d fix the error message 2023-03-12 14:48:48 +09:00
Kensei Nakada
f76258f0ff fix based on the suggestion 2023-03-05 15:01:34 +00:00
Kensei Nakada
33daba24fb fix(HPA): ignore the container resource metrics in HPA controller when the feature gate is disabled 2023-02-25 23:04:07 +00:00
Kensei Nakada
2ea50fc200 fix(HPA): make a difference in SuccessfulRescale events between the resource metric and the container resource metric 2023-02-24 14:47:38 +00:00
Freddie
dee494ece1 squashing without rebase 2023-02-17 01:47:52 +05:30
Kushagra
80384bbb55 spelling mistake rectified 2022-12-29 17:55:17 +00:00
Kushagra
f380ef8b61 Misleading message when there are no metrics. 2022-12-29 10:57:43 +00:00
ialidzhikov
aede3fbf40 pkg/controller: Replace deprecated func usage from the k8s.io/utils/pointer pkg 2022-11-23 17:40:23 +02:00
Kubernetes Prow Robot
c519bc02e8 Merge pull request #112011 from pbeschetnov/ambiguous-selectors
Add ambiguous selector check to HPA
2022-11-06 21:08:16 -08:00
Pavel Beschetnov
caddfdd040 Add pod ambiguous selector check 2022-11-04 12:49:20 +00:00
Kubernetes Prow Robot
f9f9f0107d Merge pull request #112544 from abhijit-dev82/master
HPA : Enhance error message to capture POD details
2022-10-28 04:14:30 -07:00
Kubernetes Prow Robot
85643c0f93 Merge pull request #108501 from zroubalik/hpa
add `--concurrent-horizontal-pod-autoscaler-syncs` flag to kube-controller-manager
2022-10-17 14:13:18 -07:00
Zbynek Roubalik
1cefcdea2d add --concurrent-horizontal-pod-autoscaler-syncs flag to kube-controller-manager
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-10-17 17:39:31 +02:00
Abhijit
ac56e6f34e HPA : Enhance error message to capture POD details
HPA : Enhance error message to capture POD details
2022-10-17 14:21:28 +05:30