Commit Graph

525 Commits

Author SHA1 Message Date
Jordan Liggitt
cde3140590 Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Replay of a9593d634c6a053848413e600dadbf974627515f

Kubernetes-commit: 15d9d196476d64482189f00f1cf1a2061aea5b35
2022-11-16 11:39:18 -05:00
Abirdcfly
37577f3bd4 fix a possible panic because of taking the address of nil
Signed-off-by: Abirdcfly <fp544037857@gmail.com>

Kubernetes-commit: f8a9c32a47f5d12d1baabe90a62e8637d47110d3
2022-07-19 10:39:08 +08:00
Michael Bolot
e540ebe994 Addresses the issue which caused #109115
Kubernetes-commit: cbbb5f70a47644f9830073d9d0329bf247a328a1
2022-03-29 12:35:13 -05:00
Wojciech Tyczyński
1cab68940f Add test for indexer with multiple values
Kubernetes-commit: 56159f258ca380600b0bc08b2e99cbc745db3560
2022-03-30 08:52:10 +02:00
Jian Li
6b59aa0b4a make comments of updateIndices optimization code more accurate
Kubernetes-commit: 0eae1f3addbd044793dac89f9e097e5f4c6fb2aa
2022-03-14 13:56:17 +08:00
Margo Crawford
28b9e26d5f Remove v1alpha1 of the execcredential
Signed-off-by: Margo Crawford <margaretc@vmware.com>

Kubernetes-commit: 5b690b44d08807c6434a421b0041ef685482d337
2022-03-18 10:16:11 -07:00
Antonio Ojea
e2c62ff0c0 client-go: add request and response size metrics
Get metrics for the request and response  size, so we can correlate latency
and size on a request, otherwise we could get confused because we don't know if the
network is slow or just the request size huge.

Kubernetes-commit: 64d9d0585f6dbc9266f31b6d0f795d6c0421495e
2021-12-09 12:11:01 +01:00
Di Yi
5b56e4a504 resolve casing issue
Kubernetes-commit: 9996c154cba000346db940c90e234265d67dd8a9
2022-01-28 15:50:43 +08:00
Di Yi
93a63158d4 add fieldPath back to event logs
Kubernetes-commit: 94245af8f4a144e0aceb5a4be0d3ae4993e19be7
2022-01-27 14:28:26 +08:00
Alexander Zielenski
54928eef9f modify SharedIndexInformer to use newInformer constructor which supports transformers
avoids code duplication, allows transformer to be used with SharedIndexInformer

Kubernetes-commit: 754bf3b3d02c66d1dd030460b03dddd3d6c7196d
2022-01-19 11:40:42 -08:00
Ismayil Mirzali
664b1a6c8c client-go: refactor: Fix styling issues (#107248)
* client-go: Remove unreachable return

Due to the way the switch statement is done,
the return at the end of the function will neverbe reached.

Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>

* client-go: Refactor for clarity

Fixed one instance where the error message should be lowercase.
Made the fields in the struct literal more explicit

Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>

Kubernetes-commit: 75c0987de3cb9a0380873745f68dea2f0835a7a2
2022-01-18 12:03:08 +02:00
Wojciech Tyczyński
a806c6e4fd Remove selflink references in different testing-related files
Kubernetes-commit: 551790729f1d26d75c1d3fa1411e341eb367f9f3
2022-01-13 11:33:26 +01:00
Davanum Srinivas
3bf0eac274 OWNERS cleanup - Jan 2021 Week 1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 9682b7248fb69733c2a0ee53618856e87b067f16
2022-01-03 10:59:47 -05:00
wq
3480737c9e fix typos in comment
Kubernetes-commit: 3e2932179084fa322ba1bc53997d44e1d383db00
2022-01-08 23:39:23 +09:00
Mikhail Mazurskiy
7a08020ed2 Make sleep interruptible
Kubernetes-commit: b705a521d8814b38faabea218097cac65d6ab5c5
2021-08-21 12:20:30 +10:00
astraw99
a8ff96d887 fix log typo
Kubernetes-commit: abce7ab534d0c667dd1438ff24bb3130d17d3f6e
2021-11-19 11:06:14 +08:00
Shaun Crampton
5754d8fddf client-go: Clear the ResourceVersionMatch on paged list calls
API server rejects continuations with ResourceVersionMatch set.

Kubernetes-commit: 8ac5e9b065cd9aef1543080cce1cf99cc8bb4ce9
2022-01-04 16:05:32 +00:00
Arda Güçlü
a6257fdee4 Enable setting proxyurl in kubeconfig via kubectl config (#105566)
* Enable setting proxyurl in kubeconfig via kubectl config

This PR enables setting `proxy-url` in kubeconfig via kubectl config.

* Add godoc for proxy-url unit tests

Kubernetes-commit: afdde383210294c3da573decc44b5ce55cffcb94
2021-12-20 21:21:02 +00:00
Davanum Srinivas
73f2731e23 Cleanup OWNERS files (No Activity in the last year)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 497e9c1971c9e7d0193bc6d11503ec4ad527f1d5
2021-12-10 15:18:50 -05:00
Davanum Srinivas
70f09c4943 Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 9405e9b55ebcd461f161859a698b949ea3bde31d
2021-12-09 21:31:26 -05:00
Wojciech Tyczyński
276ea3ed97 Remove support for Endpoints and ConfigMaps lock from leader election
Kubernetes-commit: 29d9683cd0fb3cc81810a8b39715e5eb4c68b00e
2021-12-07 16:38:32 +01:00
hyschumi
547d6c809a refactor: remove dup code
Signed-off-by: hyschumi<msliudongsheng@gmail.com>

Kubernetes-commit: da5d0a72d9d2a0948e21b746a8c6951dc40c0ce9
2021-11-04 21:11:53 +08:00
Antonio Ojea
2e69bf9be0 fix unassigned error on client-go test
Kubernetes-commit: 01a0fba3620c433f49120d82f908069281482a17
2021-11-16 16:58:52 +01:00
brianpursley
f5d063cf7a close streamConn and stop listening when an error occurs while port forwarding
Kubernetes-commit: 4a35e6c5641ee36291548c9c24b5b85663d5cd07
2021-11-16 21:05:43 -05:00
Justin SB
ecfd45a4d9 leaderelection: populate the apiVersion/kind when reporting events
This avoids the assumption that the kinds are populated in the schema,
and is arguably a little more efficient also.

Kubernetes-commit: 3bf06ff3a15a2f1fefeb7a70373a92cb4b94818f
2021-11-13 11:14:02 -05:00
Margo Crawford
5fca705b7d --as-uid flag in kubectl and kubeconfigs.
This corresponds to previous work to allow impersonating UIDs:
* Introduce Impersonate-UID header: #99961
* Add UID to client-go impersonation config #104483

Signed-off-by: Margo Crawford <margaretc@vmware.com>

Kubernetes-commit: 7e079f5144474cae05802771f604df2b748d781f
2021-10-19 16:12:31 -07:00
Antoni Zawodny
9af7db3c25 Add more info to the ListAndWatch trace
Kubernetes-commit: 093aa210be67f45efb1005f273d8d68444156473
2021-10-21 14:33:57 +02:00
shawnhanx
93595145a2 Support SetStructuredLogging with the new events library
Kubernetes-commit: 230cb00ddd989ae2359696f6aa09a71253936a49
2021-10-11 16:16:46 +08:00
astraw99
1816a40bbb fix word comment to common
Kubernetes-commit: 3e31933471e015a860e1967acfe730bb35422f17
2021-08-29 19:06:04 +08:00
wojtekt
c702a411d1 Create TransformingIndexerInformer
Kubernetes-commit: 56ffb4e2b056622210bbf5ce845cf63ca18e85ce
2021-09-23 09:09:59 +02:00
wojtekt
b100ecfc06 Create TransformingInformer
TransformingInfomer is like a regular Informer, but allows for applying
custom transform functions on the objects received via list/watch API calls.

Kubernetes-commit: efd3490076c391823095b4c8bd6e847ae18eb012
2020-09-29 15:06:33 +02:00
wojtekt
e61d0d5d52 Optimize index updating
Kubernetes-commit: 75273a0689250f4861ea41405e6402c6191563a8
2021-09-24 15:24:01 +02:00
wojtekt
463b3d12bb Optimize indexer
Kubernetes-commit: 27c94a49c80202790e195dde3a258cc62110c1e5
2021-09-24 14:46:56 +02:00
Madhav Jivrajani
721036c908 migrate k8s.io/apimachinery/util/clock -> k8s.io/utils/clock
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: fed2ec99c652550ed4a8c00b7cfc6c93abbc4ade
2021-09-21 15:53:43 +05:30
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
01243dd50e Migrate to k8s.io/utils/clock in client-go
Kubernetes-commit: bb7dac443a2039f97c822f610e78d4b65482c56d
2021-09-17 11:36:09 +02:00
Andrey Smirnov
8f8a83c908 fix: wrap errors correct when validating kubeconfig
This allows to check for specific errors using `errors.Is`.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>

Kubernetes-commit: a5647fa417de6d17ba200f1b4bcd2bb28cceb22c
2021-09-16 22:56:08 +03:00
wojtekt
608b5216df Migrate to k8s.io/utils/clock in client-go - part 1
Kubernetes-commit: 950f655bdd19c5af275846cf1940d767a5ec0115
2021-09-15 10:58:56 +02:00
Jordan Liggitt
5960e3c05a Propagate conversion errors
Kubernetes-commit: ba1ca0d4591f06f796ea2d93463a4c5caaa33cc7
2021-09-13 11:49:17 -04:00
kitianFresh
f0bcda0dce avoid sharedIndexInformer run more than once, avoid more cache and memory consume
Kubernetes-commit: 305c13faca48d1a6ea4d263e262ebc8df0387c84
2021-09-09 13:37:25 +08:00
Dingzhu Lurong
b86695770f Improve DeltaFIFO function 'ListKeys'
In function ListKeys, it better to use ‘queue’ instead of 'items' to get all the keys.

Kubernetes-commit: f0ce8755287b1cad087b61abfcccd79c9f151828
2021-09-02 14:02:54 +08:00
00255991
c209a2e2bc para 'resourceVersion' in DeltaFIFO.Replace is not used, so remove it
Kubernetes-commit: 2949045ec47163485118c25c40907eb43c090fac
2021-09-08 19:10:40 +08:00
astraw99
33e23edf09 fix sharedInformer doc
Kubernetes-commit: 9d84ffafd06e6ca455aa279bd513758696e8e875
2021-09-07 16:45:07 +08:00
Stephen Augustus
624e6827e6 generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>

Kubernetes-commit: 481cf6fbe753b9eb2a47ced179211206b0a99540
2021-08-12 17:13:11 -04:00
astraw99
f100d86401 fix typo CRED to CRUD
Kubernetes-commit: f8b82e189cfdc3aca7b9d789cc6f3131897f0ebc
2021-08-22 21:19:30 +08:00
astraw99
9d15ff74ca fix typo of rate limiter
Kubernetes-commit: 7953cf0ce9f890b6cba7de3325a7ce68609832a0
2021-08-15 17:48:37 +08:00
Antonio Ojea
a6edfabde7 run hack/update-netparse-cve.sh
Kubernetes-commit: 0cd75e8fec62a2531637e80bb950ac9983cac1b0
2021-08-20 01:16:14 +02:00
Iceber Gu
3e35ef93c0 client-go/events: avoid referencing a nil related object
Kubernetes-commit: 822eb29b6f333317798e5b88fc43fb28b5f33b69
2021-07-26 18:15:22 +08:00
Aleksandra Gacek
23071d64f0 Allow customizing spam filtering in event client library
Kubernetes-commit: 00080d400fe27f11795b654ad1e124311831a0fc
2021-07-26 16:05:18 +02:00
Antonio Ojea
c63d830a92 client-go: deltaFIFO trace slow handlers
If the informers handlers are slow processing the objects, the deltaFIFO
blocks the queue and the streamWatchers can not add new elements to the
queue, creating contention and causing different problems, like high
memory usage.
The problem is not easy to identify from a user perspective, typically
you can use pprof to identify a high memory usage on the StreamWatchers
or some handler consuming most of the cpu time, but users should not
have to profile the golang binary in order to know that.

Metrics were disabled on the reflector because of memory leaks, also
monitoring the queue depth can't give a good signal, since it never goes high

However, we can trace slow handlers and inform users about the problem.

Kubernetes-commit: d38c2df2c4b945bcf1f81714fc6bfd01bbd0f538
2021-07-26 16:00:31 +02:00