Commit Graph

25 Commits

Author SHA1 Message Date
Antonio Ojea
92b4ec71fb flowcontrol: remove testing dependencies
The methods NewFakeClock were using a testing dependency as a parameter,
to avoid breaking compatibility and to remove this dependency, just use
the clock.Clock interface.

If we have to do it again most probable we have chosen other pattern and
for sure other names, but now is too late.

Kubernetes-commit: 5c283cbb453acac9869b49020f6f999796360729
2024-12-12 17:42:41 +00:00
Laura Lorenz
ab2cdceca1 Maintain 10 minute recovery threshold for container backoff
Signed-off-by: Laura Lorenz <lauralorenz@google.com>

Kubernetes-commit: a0b83a774102a6d8ce03ce03c9d0431b44559019
2024-10-26 02:17:23 +00:00
weilaaa
c609c97b33 use build-in max and min func to instead of k8s.io/utils/integer funcs
Kubernetes-commit: eb8f3f194fed16484162aebdaab69168e02f8cb4
2023-12-15 15:09:11 +08:00
Abu Kashem
4b3bec4f5d client-go: add jitter to flowcontrol.Backoff
Kubernetes-commit: ec93e854ca0924b7f984641b0bbdefc12b269f2b
2021-11-08 19:30:03 -05:00
Madhav Jivrajani
b9fa896d5d Refactor client-go/util/flowcontrol/throttle.go RateLimiter
- Introduce PassiveRateLimiter which implements all methods of previous RateLimiter except Accept() and Wait()
- Change RateLimiter interface to extend PassiveRateLimiter by additionally implementing Accept() and Wait()
- Make client-go/tools/record use PassiveRateLimiter

Refactor EventSourceObjectSpamFilter, EventAggregator, EventCorrelator

- EventSourceObjectSpamFilter, EventAggregator, EventCorrelator use clock.PassiveClock now.
	- This won't be a breaking change because even if a clock.Clock is passed, it still implements the clock.PassiveClock interface.
- Extend clock.PassiveClock through Clock.
- Replace pacakge local implementation of realClock with clock.RealClock
- In flowcontrol/throttle.go split tokenBucketRateLimiters to use Clock and clock.PassiveClock.
- Migrate client-go/tools/record tests from using IntervalClock to using SimpleIntervalClock (honest implementation of clock.PassiveClock)

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: ac5c55f0bd853fcf883d9b8e1f5ef728a2fb5309
2021-08-25 21:56:26 +05:30
wojtekt
8d49a0b940 Migrate to k8s.io/utils/clock in flowcontrol backoff
Kubernetes-commit: 4ce452989bef21ab6d15bc659f463d8c706ad33e
2021-09-10 09:37:30 +02:00
Tim Hockin
bcf88f084d Update golang.org/x/time/rate (#104014)
* Add failing test case

* Update golang.org/x/time/rate

* Call update-internal-modules from update-vendor

Kubernetes-commit: 09dc055984e9532f29f37acae7aea7a979ded764
2021-07-30 02:27:36 +00:00
Ted Yu
e12fc43899 Utilize RWMutex for efficient backoff operations
Kubernetes-commit: 9e73e69f4947c88e0d9b6e35ea115086d917a2a2
2019-07-02 16:12:43 +08:00
chenjun.cj
8f99f83432 flowcontrol context aware and fix request may hang issue
Kubernetes-commit: ce8805f95fcf6540397eaa60b8d84db752f05eea
2019-06-21 12:17:46 +08:00
shinytang6
861da69465 replace time.Now().Sub with time.Since
Kubernetes-commit: 5c9f4d9dc67b28fb31fd95f88448c09150a4cbfb
2019-03-18 23:57:26 +08:00
Andrew Kim
610d917325 replace client-go/util/integer with k8s.io/utils/integer
Kubernetes-commit: 0bc5508aca9a945e92ef2a83492a70bbfcc12d13
2019-01-24 11:34:33 -05:00
Qi Jiang
35bd65deaa fix typos for TestBackoffHighWaterMark
Kubernetes-commit: 1ffe8a377dbbd1cf21693577878ff14cec98988b
2018-06-28 11:22:13 +08:00
Kubernetes Publisher
fff8c3d73e sync: initially remove files BUILD */BUILD BUILD.bazel */BUILD.bazel 2018-03-15 09:19:38 +00:00
Jeff Grafton
fca8bb2928 Autogenerated: hack/update-bazel.sh
Kubernetes-commit: ef56a8d6bb3800ab7803713eafc4191e8202ad6e
2018-02-16 13:43:01 -08:00
Jordan Liggitt
acc52496ce Switch from juju/ratelimit to golang.org/x/time/rate
Kubernetes-commit: 4b9f00988b9401f6c774d3d5e1bce45a8e8f81c8
2018-01-19 02:08:51 -05:00
Jordan Liggitt
7392f7f78f Remove Saturation() from rate limiter interface
Kubernetes-commit: a9ed90f227f07fab2da75541d57a5366ddb38f66
2018-01-19 01:59:33 -05:00
Jeff Grafton
fe985a55a2 Autogenerate BUILD files
Kubernetes-commit: efee0704c60a2ee3049268a41535aaee7f661f6c
2017-12-23 13:06:26 -08:00
Jeff Grafton
c92755ea3b update BUILD files
Kubernetes-commit: aee5f457dbfd70c2d15c33e392dce6a3ca710116
2017-10-12 13:52:10 -07:00
Jeff Grafton
5da217e5c4 Use buildozer to delete licenses() rules except under third_party/
Kubernetes-commit: a7f49c906df816123e7d4ccbd4cebab411519465
2017-08-29 12:51:55 +00:00
Jeff Grafton
fa2ceb7462 Use buildozer to remove deprecated automanaged tags
Kubernetes-commit: 33276f06be5e872bf53ca62a095fcf0a6b6c11a8
2017-08-29 12:51:55 +00:00
Jeff Grafton
f921a73942 Run hack/update-bazel.sh to generate BUILD files
Kubernetes-commit: 3579017b865ddbc5449d6bba87346f086e4b93ff
2017-08-29 12:50:17 +00:00
Tim Hockin
7bef0aa41b Inject clock through flowcontrol
Kubernetes-commit: 3153ca2815c5a596adec770392248573c7e448b7
2017-06-13 20:38:45 +00:00
Clayton Coleman
09165439d7 Refactor move of client-go/util/clock to apimachinery
Kubernetes-commit: 3e095d12b4f152a45b593927804e2e7b8816239a
2017-05-21 17:20:29 +00:00
Mike Danese
9a45999fa0 autogenerated
Kubernetes-commit: a05c3c0efdc5822049e34b1a5a1ee259c5fb1906
2017-04-15 20:28:18 +00:00
Kubernetes Publisher
fcdf37233b published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is baaaf26609565b4299008018486ec75fb30903eb
2017-01-25 15:19:43 +00:00