Commit Graph

349 Commits

Author SHA1 Message Date
wojtekt
f229b70415 Don't paginate in listwatch
Kubernetes-commit: 51eb4b50a3a607ba15a215fdcaa50baea5777afb
2020-01-02 20:09:19 +01:00
danielqsj
f67770132d unify alias of api errors under pkg and staging
Kubernetes-commit: 5bc0e26c1902e7e28abfc828de19a2dbb3e492c2
2019-11-12 16:26:59 +08:00
Jordan Liggitt
f8772cd39b Retain objects for a limited lifetime in the mutation cache detector by default
Kubernetes-commit: 81d05e91b5b5e653e20cc6ab620de08abfd0cbc2
2019-11-15 13:59:58 -05:00
Mateusz Matejczyk
d7b4c23325 pager.go: Don't set ResourveVersion on subsequent List calls
Ref. https://github.com/kubernetes/kubernetes/issues/85221#issuecomment-553748143

Kubernetes-commit: 977ca43d640d2a85e199a8a282e2df8ebd88055a
2019-11-14 11:34:59 +01:00
Pete de Zwart
ab63be7642 - Delete backing string set from a threadSafeMap index when the string set length reaches 0.
- Added thread_safe_store_test exercising new index backing string set delete at 0 functionality.

- TestThreadSafeStoreDeleteRemovesEmptySetsFromIndex logic nesting inverted.

- Added test case for usage of an index where post element delete there is non-zero count of elements and expect the set to still exist.

- Fixed date.

- Fixed awprice nits.

- Fix bazel.

Kubernetes-commit: 29a051388a719e0359969b8431de8e38e955e2a6
2019-11-08 16:57:06 +11:00
Joe Betz
a3f022a93c Add HTTP 410 (Gone) status code checks to reflector and relist with RV=''
Kubernetes-commit: e2fe126d485af243d45f06bafd2ca83931881429
2019-10-09 16:45:32 -07:00
Joe Betz
54033229aa Handle expired errors with RV>0 in pager, don't full list if 1st page is expired
Kubernetes-commit: 1f3dc14eea231c90819cbba06f25cb4221236b3f
2019-10-04 17:08:22 -07:00
wojtekt
7d13a606b3 Avoid going back in time in reflector framework
Kubernetes-commit: b2b285a766540278a768dc9e6bd07a3a676ae543
2018-08-29 11:40:25 +02:00
sshukun
cd92d91e0f Fix typo in k8s.io/client-go/tools/cache/index.go
Kubernetes-commit: a0d3e6750ecbc67d017c2c67d0ff6f12e1b0c1f1
2019-10-21 13:30:45 +09:00
Bob Killen
dc265f33cf Prune inactive owners from staging/src/k8s.io/client-go/* OWNERS files.
Kubernetes-commit: 3dc01f32eacb4791b248c22f7db9d6dabbec7869
2019-10-12 19:44:19 -04:00
matte21
cc50c9b333 Remove check causing informers to miss notifications
Fix DeltaFIFO bug that caused the sync delta created by a relist
for object ID X to be dropped if the DeltaFIFO already stored a
Delete delta for X. This caused SharedIndexInformer to miss create
notifications. Also, add unit test to expose the bug.

Kubernetes-commit: 9e4be54895e8c0655408b4766cd78de17b6d5b7c
2019-10-14 18:19:05 +02:00
Maru Newby
ab4e4fccf4 Add support for type checking Unstructured via GVK in reflector
It was previously possible to instantiate `Reflector` with
`*unstructured.Unstructured` as the expected type but this did not
support checking that event objects were of the correct API
type (e.g. if event object was `v1.Pod` in `Unstructured` form but
`v1.Service` was expected). This commit adds support for providing a
GVK via an `Unstructured` expected type to compare with the GVK of
event objects. The GVK will also be used in reflector log output.

Kubernetes-commit: 237dbfd8ad322dfcad4bd4d5345368480c22d82f
2019-09-24 01:20:40 +00:00
RainbowMango
e990876d88 Cleanup staticcheck from staging/src/k8s.io/client-go/tools/cache.
Kubernetes-commit: 19e5c8565d444cbb81d554a69960d7144996b05a
2019-09-04 18:32:06 +08:00
Darren Shepherd
6d3b14b468 Check cache is synced first before sleeping
If a cache was already synced, cache.WaitForCacheSync would
always take 100ms to complete because the PollUntil method will
sleep first before checking the condition.  Switching to
PollImmediateUntil will ensure already synced caches will return
immediately.  For code that has, for example, 20 informers, the time
to check the cache was in sync would take at least 2 seconds, but with
this change it can be as fast as you can actually load the data.

Signed-off-by: Darren Shepherd <darren@rancher.com>

Kubernetes-commit: 8a58f332dd62b68ae22c67585002defe6aeb4b04
2019-09-06 16:30:04 -07:00
Yassine TIJANI
7ee6383729 move WaitForCacheSync to the sharedInformer package
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>

Kubernetes-commit: 7e4c3096fe71afc6a23c273b3309ed5db7289d8c
2019-08-16 21:15:53 +02:00
Ted Yu
541253da74 Utilize reflectorMutex in LastSyncResourceVersion
Kubernetes-commit: 4f54538ae8ff7a4e6829bea1479194af87b7833c
2019-08-26 07:46:26 -07:00
likakuli
6a1fb71239 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
Tomas Nozicka
cbdb98d74d Rename Until to UntilWithoutRetry and move to using context so it's
cancelable

Kubernetes-commit: 3d4a02abb54244861f9f05b8db2fdfdaa2c6f67c
2018-08-02 14:11:59 +02:00
David Eads
21fd7d2b8a name runtime.Schemes so we can see which one fails
Kubernetes-commit: 340802b079dbf8d193f162d49663679bd7d24ef7
2018-07-06 09:18:05 -04:00
Zhonghu Xu
b9ecec59bd remove inaccurate comment about watch timeout
Kubernetes-commit: 9561269d9308278018da0284638baed1d1c33144
2018-05-31 16:20:04 +08:00
hzxuzhonghu
1e55c20903 Replace "golang.org/x/net/context" with "context"
Kubernetes-commit: 70e45eccf27726f0e63dd1024924ccc7e2cd35a0
2018-02-28 12:20:22 +08:00
Walter Fender
cafb570f17 Fix local cluster leaking memory.
Local cluster is leaking memory due to mutation detector being enabled.
In addition there is no warning in the logs that this could be the
issue.
Added a log warning when this feature is enabled to make debugging this
issue easier for other cases of this.
Fixed import ordering as per @liggitt

Kubernetes-commit: 07ba609b50d6f00c52acbfd6eaa43e6b527c5c2d
2018-03-06 13:03:30 -08:00
Kubernetes Publisher
fff8c3d73e sync: initially remove files BUILD */BUILD BUILD.bazel */BUILD.bazel 2018-03-15 09:19:38 +00:00
Haowei Cai
3bf2cc9238 Add comments about potential race in delta fifo.
Kubernetes-commit: 8b03e77aec6fe9496edf51ba11d580c460e8fb5e
2018-01-31 15:22:09 -08:00
Jeff Grafton
fca8bb2928 Autogenerated: hack/update-bazel.sh
Kubernetes-commit: ef56a8d6bb3800ab7803713eafc4191e8202ad6e
2018-02-16 13:43:01 -08: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
Kris
5c864f2fba Add started state to the processor to protect against double starts
This prevents a race condition where the sharedIndexInformer was
causeing the processorListener's run and pop method to be started
twice. That violated the SharedInformer's interface guarantee of
sequential delivery and also caused panics on shutdown.

Kubernetes-commit: 3c36d9e373d8e272ad303f359d040621edeb999e
2018-02-13 11:33:21 -08:00
Kris
3f0de10d86 Add a test case for the race in #59822
Kubernetes-commit: be482ad51c21d493f4b83de9aa06c511a552b5b1
2018-02-13 11:32:36 -08:00
yue9944882
3c4da130df fix irregular descriptive docs
Kubernetes-commit: dc2f6f9325008dbdb32acef5b1ceb80b67df0df6
2018-02-02 21:05:49 +08:00
David Eads
1c2a06d4c0 don't stop informer delivery on error
Kubernetes-commit: 2fa93da6d5efd97dbcaad262a9e59073de9c5298
2018-01-18 13:07:18 -05:00
Ashley
f5d6749301 Fixed spelling of Promethus to Prometheus
Kubernetes-commit: 6a209a1e51d785fb7f7add90b5c1311c35713034
2018-01-16 20:35:00 -05:00
David Chang
34ead21345 Enable list option modification when create list watch
Kubernetes-commit: 2780b8f9e4bba0a27b44e0647a579b1c435987b1
2017-12-21 17:10:47 +08:00
Jeff Grafton
b7af4c11d3 Use race="off" mode instead of disabling race feature
Kubernetes-commit: a532ecd7041f59962f8fb29d4628be07edb02741
2017-12-04 14:23:44 -08:00
Jeff Grafton
fe985a55a2 Autogenerate BUILD files
Kubernetes-commit: efee0704c60a2ee3049268a41535aaee7f661f6c
2017-12-23 13:06:26 -08:00
silenceshell
d6f5cef499 fix a typo
`timemoutseconds` should be `timeoutSeconds`.

Kubernetes-commit: ee5ea41f4d199b9cef022edc77185eab995c509d
2017-12-20 13:35:43 +08:00
Dr. Stefan Schimanski
097057c51c reflector: exit retry loop on closed stopCh
Kubernetes-commit: 8d98c846272b3fb4988bebf54b197d24d8fb3b5f
2017-11-07 12:31:31 +01:00
Wei Wei
73c17354d4 rename metric reflector_xx_last_resource_version to reflector_last_resource_version{name="xx"}
Kubernetes-commit: bca495e2291b0a888d5aaee10e901ddb28e937b2
2017-11-01 16:34:18 +08:00
Clayton Coleman
8c1471aeda cache.ListWatchUntil should return err.ErrWaitTimeout
Clients shouldn't have to know about watch.ErrWatchClosed, which is
typically a server side decision to close and always means "Timeout" in
this conetxt.

Kubernetes-commit: cbecf177274e6f6924d6ca756eccf0a55e2933c0
2017-10-05 18:51:57 -04:00
supereagle
c489f97d4e fix typos: remove duplicated word in comments
Kubernetes-commit: 87c29a08e1f51b2989ff15fc3e5857bc287e401f
2017-06-17 17:17:22 +08:00
Jeff Grafton
c92755ea3b update BUILD files
Kubernetes-commit: aee5f457dbfd70c2d15c33e392dce6a3ca710116
2017-10-12 13:52:10 -07:00
juanvallejo
3df32f530e perform nil check before iterating over keys
Kubernetes-commit: 1fcd410d4ae9b8dbe3cf5d340582f078abc7b2b4
2017-10-12 16:25:31 -04:00
Clayton Coleman
f49c543e2a Enable API chunking and promote to beta for 1.9
All list watchers default to using chunking.

Kubernetes-commit: 113889e72da573946f3389b628251647c2a858b9
2017-09-23 15:21:54 -04:00
Mikhail Mazurskiy
f660c1f78a Panic on failure to calculate index key
Kubernetes-commit: 65369a68a1f6ff01d8d108ccd8424f92013ae876
2017-09-30 14:52:15 +10:00
Mikhail Mazurskiy
00c624b92c Ring buffer for notifications
Results from BenchmarkListener:
Current code:
1000000	      1540 ns/op	     109 B/op	       1 allocs/op

New:
1000000	      1139 ns/op	      16 B/op	       1 allocs/op

Kubernetes-commit: 1940f5a5d2acce377ab16b5561f3d9002fb2a319
2017-09-26 21:58:48 +10:00
wackxu
d31224ad22 add verify case in index_test.go
Kubernetes-commit: 4ab3f4500164d9a15628c4646810f67b37e57023
2017-09-01 10:03:08 +08:00
Joe Finney
88ea2eef1a Enable go race detection for bazel tests.
There are a couple tests that need to run without race detection
enabled. See issue 39649 for details.

Kubernetes-commit: d4676b67539419aced720772b13f556de8065fc1
2017-09-13 13:41:58 -07:00
Dr. Stefan Schimanski
7cdaec7d07 client-go: simplify deepcopy calls
Kubernetes-commit: ed423054ba0089a6d58fb0e048fe1acfd966f0d7
2017-08-15 14:15:58 +02:00
Clayton Coleman
f549520368 Disable default paging in list watches
For 1.8 this will be off by default. In 1.9 it will be on by default.
Add tests and rename some fields to use the `chunking` terminology.

Note that the pager may be used for other things besides chunking.

Kubernetes-commit: 8b571bb63bd8a9a6a37db6046a6ab35d3b047bf4
2017-09-09 21:30:07 +00:00
Clayton Coleman
2b76a1826e Enable paging for all list watchers
Kubernetes-commit: 500b130ff0a2c744b21cfb8e6d09e94b707dec61
2017-09-03 13:49:07 +00:00
Mikhail Mazurskiy
174c4c21d7 Call the right cleanup function
Kubernetes-commit: 1ab88c94e8e3b9ccfe16b2b0dbf26f688be1d4df
2017-08-29 12:54:04 +00:00
Andy Goldstein
97bf9e0e35 Add ncdc to client-go/tools/cache OWNERS
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>

Kubernetes-commit: 49bef684d3adc28fedf940d20fb9a2ae58c12c1b
2017-08-29 12:53:02 +00: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
Bobby (Babak) Salamat
3c733696a3 autogenerated files
Kubernetes-commit: 68926a22ac1365a47caba55b0f9fcbebfdf0de76
2017-08-29 12:51:54 +00:00
Bobby (Babak) Salamat
5d104a8df6 Add a heap data store to client-go
Kubernetes-commit: 6cad5bbff918726becddf4a64ef9b130bbcf13e7
2017-08-29 12:51:54 +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
Mikhail Mazurskiy
0648979117 Improve shared informer notification dispatching
Kubernetes-commit: 35e849bff2e4e2e1b08ee183992d620d4e409f54
2017-08-29 12:49:48 +00:00
Jordan Liggitt
755bbca820 Fix duplicate metrics collector registration attempted error
Kubernetes-commit: 1da4f4a745bf536c34e377321a252b4774d1a7e0
2017-08-29 12:49:19 +00:00
deads2k
a335243fc8 add reflector metrics
Kubernetes-commit: 151d39682e62b288c247d8174a5f7fb139ee7bd1
2017-07-28 13:45:49 +00: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
3954f889c7 Remove use of (Label|Field)SelectorParam
Kubernetes-commit: b6d9815b95940002545b4aa7affb892d94637a49
2017-07-19 03:39:07 +00:00
Mike Danese
c0b21e1d03 remove some people from OWNERS so they don't get reviews anymore
These are googlers who don't work on the project anymore but are still
getting reviews assigned to them:
- bprashanth
- rjnagal
- vmarmol

Kubernetes-commit: c201553f2776ac401549d561485f9a5cb4841ae8
2017-07-16 03:58:42 +00:00
Cao Shufeng
812b4cbd4b Use glog.*f when a format string is passed
ref:
https://godoc.org/github.com/golang/glog

I use the following commands to search all the invalid usage:
$ grep "glog.Warning(" * -r | grep %
$ grep "glog.Info(" * -r | grep %
$ grep "glog.Error(" * -r | grep %
$ grep ").Info(" * -r | grep % | grep "glog.V("

Kubernetes-commit: 0c577c47d5331e61caf11469a52c2583d087cdcf
2017-07-16 03:58:42 +00:00
Chao Xu
8fa00ce039 run hack/update-all
Kubernetes-commit: 60604f8818aecbc9c3736fbc32747cc0a535bc80
2017-06-28 00:06:44 +00:00
Chao Xu
d82cfb70dd run hack/update-staging-client-go, somehow we copied listers/<authn,authz,imagepolicy>
Kubernetes-commit: ffe74d1fe749b5887711f70af24e1375856f2520
2017-06-28 00:06:44 +00:00
Chao Xu
1e9caa8e14 run root-rewrite-import-client-go-api-types
Kubernetes-commit: f2d3220a11111f86b2f481e70e3c1ca4f5896f44
2017-06-28 00:06:44 +00:00
Clayton Coleman
074f58b23a generated: bazel
Kubernetes-commit: ad720cc651916aedd1d3aca665eff901c3445a88
2017-05-21 17:20:29 +00:00
Clayton Coleman
25835dfc1e Mutation cache should support retrieving items from ByIndex()
Allows tokens controller to observe updates

Kubernetes-commit: 5ac3214c427614ec5c4a53ddc05d952474402412
2017-05-21 17:20:29 +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
deads2k
3290c558e2 start using customresourcedefinition.status
Kubernetes-commit: cb604f756a7147fab8b5b4cccd3fd6869ef9bb2c
2017-05-17 17:20:30 +00:00
deads2k
0aaf615b8c add mutation cache filter
Kubernetes-commit: f88c7725b4f9446c652d160bdcfab7c6201bddea
2017-05-17 17:20:30 +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
384737846d bazel
Kubernetes-commit: 958903509c29fdfe216c0bbf0abce1ce0abd59a6
2017-04-28 20:28:26 +00:00
Chao Xu
cf012f20d0 easy changes
Kubernetes-commit: 3fa7b7824abbf3daec1189b118b91b5bb726958f
2017-04-28 20:28:25 +00:00
Christoph Blecker
ad53524c7c Fix gofmt errors
Kubernetes-commit: 6681835b0c00122a408bd4addd47b02840b6208c
2017-04-18 20:28:21 +00:00
Antoine Pelisse
b128bee2cc OWNERS: Create sig-node alias
Create an alias group for sig-node
WaitForCacheSync method comment "contoller" is error word

Kubernetes-commit: 77cbdddb5907a81cb6bbd9b9234e2acfd4394004
2017-04-18 20:28:21 +00:00
Mike Danese
9a45999fa0 autogenerated
Kubernetes-commit: a05c3c0efdc5822049e34b1a5a1ee259c5fb1906
2017-04-15 20:28:18 +00:00
Timothy St. Clair
bcb754b775 Update staging files
Kubernetes-commit: fc04bba10e18eef666de3f7348513af49b27019c
2017-04-12 20:28:20 +00:00
Timothy St. Clair
656cf48fd6 Level sets dependency graph to consume etcd 3.1.5
Kubernetes-commit: 93c051e28fc43ed35cb9074f6de5a8c4de799eb2
2017-04-12 20:28:20 +00:00
deads2k
dcd132623d remove ListMetaFor
Kubernetes-commit: 7df37c484dac3438530f2b8cb03cf63f85f2fc29
2017-04-08 20:28:18 +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
fb6075f2e0 published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is abed7461722c195f8c77b4c502743e012d19d095
2017-01-27 15:19:42 +00:00
Kubernetes Publisher
f427d46f91 published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is 122bf004bf5d03f96d9f205d4008b6ea8b47d209
2017-01-26 15:19:41 +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
Kubernetes Publisher
687fd42903 published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is 68f123dfa036bef57495f014a78144a9a1b517ca
2017-01-24 15:19:42 +00:00
Kubernetes Publisher
0eb5431cb7 published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is 8d5227bb2e05e01031ace81fa6611a13f598278e
2017-01-21 15:19:42 +00:00
Kubernetes Publisher
8fa0506b26 published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is d9467519245c3858ac58c5fa91ec9e5b16c1f507
2017-01-18 15:19:42 +00: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
243d8a9cb6 published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is d8c925319a23f6bbf865baa53ae23f48f60dd73b
2016-12-11 15:19:40 +00:00
Kubernetes Publisher
6841809cf1 published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is 9a89e8cdcb0fd8a887822bc3c573cdb2259424c5
2016-12-08 12:17:59 +00:00
Kubernetes Publisher
124670e99d published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is 81d788dd6e0748e5d53a62c16d933c5f7a0718af
2016-12-04 11:39:55 +00:00
Kubernetes Publisher
5d8c36c93c published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is 124fb610dcbd445fa710da67508ac6d5b822f61d
2016-11-24 08:15:51 +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
ae6775eeec published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is 1bc5b822cd566321c115d4ebac5d97cfd347d687
2016-11-11 03:39:04 +00:00
Kubernetes Publisher
b22087a53b published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is 71ba8a90f0a4f3a307cffeb8f8566d13277cb135
2016-10-30 21:06:23 +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