Commit Graph

28 Commits

Author SHA1 Message Date
kfu
6db26dd413 Fixes formatting and typos in client-go docs
Kubernetes-commit: d0de4483d51c5811202f1731a835c75d8fc8b30e
2021-04-27 21:28:23 +02:00
Maciej Borsz
a52faa7892 Add WatchListPageSize to cache.Config
Currently there is no way to specify WatchListPageSize used by Controller. This PR adds a field that can be used to specify this.

Change-Id: I241454a45dd94d3ea65a91b297f530e217f843aa

Kubernetes-commit: 43f5afe1a1dd058a2564cd3b2f330fc2a401f607
2020-08-31 12:52:45 +02:00
gobomb
330cb14339 let panics propagate up when processLoop panic
Kubernetes-commit: 19a3ca2c289b6f3dc8cd495e3db0d347b5a3b774
2020-08-03 09:30:39 +00:00
Nick Santos
ccd5becdff cache: add error handling to informers
When creating an informer, this adds a way to add custom error handling, so that
Kubernetes tooling can properly surface the errors to the end user.

Fixes https://github.com/kubernetes/client-go/issues/155

Kubernetes-commit: 435b40aa1e5c0ae44e0aeb9aa6dbde79838b3390
2020-01-17 12:46:08 -05:00
Mike Spreitzer
d7a772a8de Documented mutation restriction for informer clients
Also brushed up some other informer comments for readability and
nitpicking accuracy.

Kubernetes-commit: c4774de94a80bb7d0f54a8a728ad3e97ad1a07b9
2020-03-16 17:38:14 -04:00
Casey Callendrello
b775e00fe5 informers: don't treat relist same as sync
Background:

Before this change, DeltaFIFO emits the Sync DeltaType on Resync() and
Replace(). Seperately, the SharedInformer will only pass that event
on to handlers that have a ResyncInterval and are due for Resync. This
can cause updates to be lost if an object changes as part of the Replace(),
as it may be incorrectly discarded if the handler does not want a Resync.

What this change does:

Creates a new DeltaType, Replaced, which is emitted by DeltaFIFO on
Replace(). For backwards compatability concerns, the old behavior of
always emitting Sync is preserved unless explicity overridden.

As a result, if an object changes (or is added) on Replace(), now all
SharedInformer handlers will get a correct Add() or Update()
notification.

One additional side-effect is that handlers which do not ever want
Resyncs will now see them for all objects that have not changed during
the Replace.

Kubernetes-commit: ca1eeb99b530a6d76b464dad545abc18d4508c49
2019-12-16 18:34:30 +01:00
Mike Spreitzer
d01661091c Further tweaking up the wording
Hopfully improving, based on wojtek's review.

Kubernetes-commit: 59807be5abe6a96aad715823b7bab9fbd5d837bd
2020-01-10 16:05:41 -05:00
Mike Spreitzer
c68732b808 finished pass over comments on Controller, and commented sharedIndexInformer
Kubernetes-commit: f2a8e2d9c9cadc8a969efa1d4edef833ff701e2f
2020-01-07 02:23:29 -05:00
Mike Spreitzer
edca648925 A little more comment tweaking for cache.Controller
Kubernetes-commit: 7d82e23e6cd61af212e73f6fb77c2f74c1628a84
2020-01-06 16:11:26 -05:00
Mike Spreitzer
db5618cb1f began turning attention to cache.Controller
Kubernetes-commit: 72fa714d636dc2f614b251c78cd8297f7754b333
2020-01-06 15:59:11 -05:00
Ted Yu
541253da74 Utilize reflectorMutex in LastSyncResourceVersion
Kubernetes-commit: 4f54538ae8ff7a4e6829bea1479194af87b7833c
2019-08-26 07:46:26 -07:00
RainbowMango
2b8d87c082 1. Fix lint errors for the whole directory staging/src/k8s.io/client-go/tools/cache;
2. Remove staging/src/k8s.io/client-go/tools/cache from .golint_failures;
3. Fix some typo from comments.

Kubernetes-commit: 0e0e1f7daba0a6ae6dd59df0a1bb643c323ad8cb
2019-07-10 12:00:52 +08:00
Adrián Orive
0f2b134a3e Add newInformer documentation
Signed-off-by: Adrián Orive <adrian.orive.oneca@gmail.com>

Kubernetes-commit: b09c1ce5ddb7473b8b9dd5d63b46267381ed852f
2018-11-14 08:36:38 +01:00
Adrián Orive
2e9f26a34c Remove duplicate code
Signed-off-by: Adrián Orive <adrian.orive.oneca@gmail.com>

Kubernetes-commit: b6c3129ac5895db6df61601cfc72e2efa03fd72c
2018-11-08 15:46:56 +01:00
wojtekt
58ae7b3039 Couple fixes to DeltaFIFO machinery
Kubernetes-commit: d880f8c1ca3077496ceafadbb8807618b3f6e684
2019-01-23 09:45:37 +01:00
Dan Williams
577c46c713 Remove unused DeltaFIFO compressor argument to NewDeltaFIFO
Nobody uses it; the one or two older users from 1.4/1.5 timeframe
were removed for 1.6.  It's also poorly understood and the sole
example is in the testcases, and it's pretty incomplete.

If anyone really wants compression, they can revert this PR.

Kubernetes-commit: a56c8f50cb9b9bfdb92bc5f005a48f8df5afadb9
2017-03-21 14:53:30 -05:00
Mikhail Mazurskiy
1a0ee4cda2 Refactor Start functions into an object
Kubernetes-commit: 6464774a9b94f6e8376e11d015fd55e98457e74c
2017-07-19 03:39:07 +00:00
Mikhail Mazurskiy
0a8adc4df4 Improve Start functions
Kubernetes-commit: d11a9973cfd421b7f723156bbb2b256851f7460d
2017-07-19 03:39:07 +00:00
Mikhail Mazurskiy
5f6ea627a3 Shared Informer Run blocks until all goroutines finish
Fixes #45454

Kubernetes-commit: d789615902ead2a112ad24fbfebe95285b87004b
2017-07-19 03:39:07 +00:00
Clayton Coleman
d84ceacdd1 Add a filtering resource handler for informers
Allows an informer consumer to easily filter a set of changes out,
possibly to maintain a smaller cache or to only operate on a known set
of objects.

Kubernetes-commit: 5439cfd24571a1727aacf741d3ab8bd33f974cab
2017-05-21 17:20:29 +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
Guangya Liu
5a21aa58a2 Added indexer description for the API of NewIndexerInformer.
Kubernetes-commit: e42f7c7480c304144b3c90089232c5fc59229cce
2017-05-12 17:21:59 +00:00
Chao Xu
088dc4a30d manually sync with k8s.io/kubernetest at 17375fc59fff39135af63bd1750bb07c36ef873b, k8s.io/apimachinery at d90aa2c8531f13b0ca734845934c10dcb6a56ca7 2017-02-23 12:27:32 -08:00
Kubernetes Publisher
0e140df9af published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is 3aa29bca4f6f9e43d8e2a8e3a1587d92b1b2dfe2
2017-01-17 15:19:43 +00:00
Kubernetes Publisher
204f12b1f3 published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is 616038db1b0d1e852b4a3d10c8c512a052f91fba
2017-01-14 15:19:47 +00:00
Kubernetes Publisher
89c6009983 published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is 800ef09dc19c04789c49c2e83e963bbd986cda7a
2016-11-12 03:39:06 +00:00
Kubernetes Publisher
75399f68c8 published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is e56cfc5322138aa23e6418ee30a6ab54c7c6fe8c
2016-10-21 04:44:19 +00:00
Chao Xu
a6d206121d remove the top-level folders for versions
remove scripts
2016-10-19 14:34:19 -07:00