Commit Graph

134 Commits

Author SHA1 Message Date
Ted Yu
35c406afa6 Utilize reflectorMutex in LastSyncResourceVersion
Kubernetes-commit: 4f54538ae8ff7a4e6829bea1479194af87b7833c
2019-08-26 07:46:26 -07:00
likakuli
dcdb50aa6e fixes a bug that connection refused error cannot be recognized correctly
Kubernetes-commit: 3cec9098020ecc168573c7ee658282954dac2a2e
2019-08-20 12:18:46 +08:00
Mike Spreitzer
0c0e2ef3a2 Added info requested in review of #77636, and more
Added definition of "collection states" and noted that informer cache
queries are answered against these.

Also added an explicit note that the concept of object identity used
in the contract here does _not_ include ObjectMeta.UID.

Also updated the description of the notifications received by a
client, to account for the fact that a client can be added after the
informer starts running.

Added references to `MetaNamespaceKeyFunc` and
`SplitMetaNamespaceKey`.

Noted that a client must process each notification promptly and added
a referral to workqueue.

Made a couple other minor clarifications and corrections.

Kubernetes-commit: 848301e11a8558f6a90e2fada870a91baace812a
2019-07-25 01:45:22 -04:00
Joe Betz
1522bb2fc6 Replace string concatination with trace fields
Kubernetes-commit: 46a04d50af78e01d06a9879d62cc71fbe892076f
2019-08-02 23:47:24 -07:00
Ted Yu
a865205fb0 Store key in TimestampedEntry
Kubernetes-commit: 69fb4e960f7359641b3503b734acc32af6b05e04
2019-07-29 14:53:49 -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
wojtekt
a553c2c2cc Enable watch bookmarks in reflector
Kubernetes-commit: 175c07f4e6d3a59bb6d9870c4a4a78c41940b2dd
2019-07-04 13:12:08 +02:00
Odin Ugedal
2ee65257e5 Fix file permissions for non executable files
Normal files should have permissions 644 by default,
and does not require the last bit to be
executable

Signed-off-by: Odin Ugedal <odin@ugedal.com>

Kubernetes-commit: 35cb87f9cf71776e99a970dfff751cd29ba7ebfb
2019-06-14 21:04:39 +02:00
Mikhail Mazurskiy
458bdf6a67 Add missing TestMain() functions
Kubernetes-commit: ca38fba0af59e1193625a18002d0bf1408c4106c
2019-01-30 15:27:39 +11:00
Mikhail Mazurskiy
c90a87409a Cleanup math/rand package usage
Kubernetes-commit: 4ce1fb7d40beb9010e56d60792c4da25e8d86ed0
2018-11-17 16:45:36 +11:00
Haosdent Huang
465553e287 Fix typos.
Kubernetes-commit: 7ce6e7189166e8b284ab44ae1dccd4df1719ab3e
2019-06-09 15:34:53 +08:00
Mike Spreitzer
1ec4b74c7b Fixed and clarified comments and parameter names in index.go (#77633)
* Fixed and clarified comments and parameter names in index.go

Fixed the comment on IndexFunc to say that it returns multiple indexed values.

Clarified the comments and parameter names in the Indexer interface to
consistently use a dichotomy between "storage keys" and "indexed
values".

* Updated comments in index.go based on review by Liggitt

Kubernetes-commit: 4160909495626262ae514bab30fe81a3ff869d39
2019-06-26 04:54:20 +00:00
Sally O'Malley
23e6ea699e Modify klog Warning 'The resourceVersion for the provided watch is too old' to Info.
This warning comes from Reflector watchHandler, from the apiserver error that
indicates a watch was restarted.  This happens when etcd drops the connection
and resources are relisted.  This informs the user that the watchers are
operating properly, so should be logged as Info rather than Warning.

Kubernetes-commit: a953d1542c06456c6fe97121abd99acd352545df
2019-06-13 16:36:06 -04:00
Monis Khan
55984cdeff cache mutation detector: use correct diff function
The cache mutation detector must use a diff function that is
designed to show differences that cause reflect.DeepEqual to return
false.

Signed-off-by: Monis Khan <mkhan@redhat.com>

Kubernetes-commit: dd4f53cd45499687e768de46a15038d61935ab96
2019-06-10 15:47:51 -04:00
Shintaro Murakami
b37f4f2534 Change to use a constant
Kubernetes-commit: 2fcb248354ed5a3bf3154b1a8a0aafa237b2b37c
2019-05-17 18:40:03 +09:00
Mike Spreitzer
76ec0dac1e Fix comment on SharedInformer.Run
The old wording suggested that `Run` only gets the controller started.
Changed the wording to make it clear that `Run` only returns after the
controller is stopped.

Kubernetes-commit: fad9dec758be4dcc49735aea98ada2de46cff9fe
2019-05-04 23:27:42 -04:00
Mike Spreitzer
1dd778153e Made the comment on SharedInformer give a complete description
This comment formerly contained only a contrast with "standard
informer", but there is no longer such a thing so the comment lacked
much important information.

Kubernetes-commit: 121e4741463043eac188bb4eed51f07122262d69
2019-05-09 01:34:02 -04:00
Davanum Srinivas
2537fc5f76 remove unused code
Change-Id: If821920ec8872e326b7d85437ad8d2620807799d

Kubernetes-commit: 7b8c9acc09d51a8f6018eafc49490102ae7cb0c4
2019-04-18 17:22:45 -04:00
fansong.cfs
94d52886d7 add watch bookmark
Kubernetes-commit: d70edd3d39d4430d71c4b7c9adba8df5ba7f16c8
2019-03-19 18:16:23 +08:00
Joe Betz
d43f2ef228 Add resourceVersion=0 paginated list integration test for disabled and enabled watch cache
Kubernetes-commit: e5a4f09ab3ac15815ceb039fbc7f546266855fd6
2019-03-21 11:25:07 -07:00
Joe Betz
d858f18787 Paginate List call performed by Reflector's ListAndWatch call
Kubernetes-commit: 84723c2d3ef5ff5d30aadd1ad72068bf2254358c
2019-03-14 13:26:19 -07:00
wojtekt
49804083df Avoid allocations in ByIndex() function
Kubernetes-commit: 7d46e27db185e5281b718ad964e9c2f8777c2fc8
2019-03-26 14:14:42 +01:00
shinytang6
861da69465 replace time.Now().Sub with time.Since
Kubernetes-commit: 5c9f4d9dc67b28fb31fd95f88448c09150a4cbfb
2019-03-18 23:57:26 +08:00
Clayton Coleman
c48e0dd815 Avoid using %#v for errors when %T is more informative
`%#v` may have significant performance costs in frequently invoked code.

Kubernetes-commit: 435db312e1773d3ad506604219b9b1d00176d6fc
2019-03-21 22:54:06 -04:00
tiffany jernigan
9e76b965b3 Updated client-go expiration cache to take in expiration policies
Kubernetes-commit: bc226a2a899a6d7d85be3b589d20d22c4777f84e
2019-03-22 07:38:35 +00:00
Han Kang
a1320a3a47 Remove reflector metrics as they currently cause a memory leak
Kubernetes-commit: ca096f8069aff73b774c8ef38900dca898c61938
2019-02-26 16:22:24 -08:00
Tomas Nozicka
ce00ab47ae Add Until based on RetryWatcher
Kubernetes-commit: 09af8485f253421cdf0c20a40d12784e8fcffd5a
2019-01-03 13:45:46 +01: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
Justin SB
931e6a04ad Remove executable file permission from OWNERS files
Kubernetes-commit: dd19b923b7c26420af39fcf4eedfa213b236c8d3
2019-01-03 12:18:20 -05:00
Ted Yu
353e58d58a Reduce the duration where expirationLock is held for expiration_cache
Kubernetes-commit: 4e3fd13a93b0ed7ec0d81a00f61da54bb3936fbc
2019-02-06 10:16:54 -08:00
Roy Lenferink
94093d2527 Updated OWNERS files to include link to docs
Kubernetes-commit: b43c04452f3b563473b5c2a765d4ac18cc0ff58f
2019-01-30 20:05:00 +01:00
Kubernetes Prow Robot
0d661d3855 sync: squashed up to merge 94b5aeba9dfa5f10c8a920a229795249a919c127 in e72b32558c8e9ed16690ef5a8e909c12fcc47f87 2019-02-01 14:01:34 +00:00
Krzysztof Siedlecki
57d4daeaf4 adding trace to reflector initialization
Kubernetes-commit: 4e4d380b32105c3ff7641661120da876bca060de
2019-01-24 16:30:47 +01:00
Andrew Kim
3fa0933a1e replace client-go/util/buffer with k8s.io/utils/buffer
Kubernetes-commit: 2358e75da3379720d2cc1d86384d4830a1557b88
2019-01-24 11:37:48 -05:00
wojtekt
58ae7b3039 Couple fixes to DeltaFIFO machinery
Kubernetes-commit: d880f8c1ca3077496ceafadbb8807618b3f6e684
2019-01-23 09:45:37 +01:00
Wojciech Tyczynski
2ee37da3f5 Revert "Adding trace to reflector initialization"
Kubernetes-commit: c8d89b34cc692c4b477fe40ac4511be73a581629
2019-01-23 14:50:37 +01:00
Krzysztof Siedlecki
213861716a adding trace to reflector initialization
Kubernetes-commit: 21334f1f28df3c7f3408f0933ddd19cb7c64a3ea
2019-01-22 10:57:29 +01:00
Tomas Nozicka
5180cf1076 Make reflector list cancelable
Kubernetes-commit: 10f52e7c70d9ad4a3cf0ca09c6f36e208b9ac494
2019-01-21 14:58:23 +01:00
Ben Keith
616d41b047 Fixing Update Function in FakeCustomStore
Kubernetes-commit: 85ec3ed24364fad9cd3472713762a02f58b264a6
2018-04-11 11:00:57 -04:00
wojtekt
a2b80e67e1 Speedup listers for empty selectors
Kubernetes-commit: 91e7f466b916c50b8c1cdb330fd06b397f49a358
2018-12-28 15:34:43 +01:00
Michalis Kargakis
81acdc381b Remove myself from OWNERS where I am not active
Kubernetes-commit: c602a9ed4ffba92a229dcc45f1a9e3036596d90b
2018-12-19 10:19:22 +01:00
Adrián Orive
cb4ba7f9b2 DeltaFIFO cleanup
Remove non-needed else condition
Remove non-needed swallow copy
Simplify return for IsClosed()
Keep amount decrement next to element extraction from the queue

Signed-off-by: Adrián Orive <adrian.orive.oneca@gmail.com>

Kubernetes-commit: 0b16c43f59b736060bc18e2e1de0e7fcc268f39b
2018-11-14 08:59:51 +01:00
Davanum Srinivas
74cd8bbeee Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135

Kubernetes-commit: 954996e231074dc7429f7be1256a579bedd8344c
2018-11-09 13:49:10 -05:00
Adrián
d016aa7909 Optimized map allocation in Replace methods
Initial allocation of several maps as the sizes are known

Signed-off-by: Adrián Orive <adrian.orive.oneca@gmail.com>

Kubernetes-commit: 2299f45f52464beff889fce7be1f66642a92b791
2018-10-25 11:42:35 +02:00
Han Kang
9d900fc3f3 refactor index_test to compress the basic expected assertions
Kubernetes-commit: de0043b1d37ee27f1d75c22865667cedc54eec1b
2018-10-08 11:38:19 -07:00
Christoph Blecker
7f1c01699a Update gofmt for go1.11
Kubernetes-commit: 97b2992dc191a357e2167eff5035ce26237a4799
2018-10-05 12:59:38 -07:00
song
bd418b4186 remove duplicated words in heap.go and interfaces.go
Kubernetes-commit: dd4a8f9cab80aaf280ed5ed95a6facc26c00d928
2018-09-17 18:00:19 +08:00
Bryan Boreham
17d4c50f8a Remove unused function timeoutFromListOptions()
Kubernetes-commit: 2663fee405521b2cd5538583533f5d812bc3d996
2018-02-22 15:15:57 +00:00
Tomas Nozicka
82acb64076 Move ListWatchUntil to its kin
Kubernetes-commit: 07b8373ab393547239ed4fe227758a1715480f22
2018-08-03 15:22:42 +02:00