Commit Graph

292 Commits

Author SHA1 Message Date
Ted Yu
35c406afa6 Utilize reflectorMutex in LastSyncResourceVersion
Kubernetes-commit: 4f54538ae8ff7a4e6829bea1479194af87b7833c
2019-08-26 07:46:26 -07:00
Yassine TIJANI
d975a76928 check that the recorded event is not nil on refreshExistingEventSeries
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>

Kubernetes-commit: 000c2c557f862270ec83341c1af3fcd7c6f7d4a2
2019-08-22 11:56:35 +01: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
Tariq Ibrahim
c3eee973ab Address review comments
Kubernetes-commit: 805640382339f646a175f04f9e4846d5bf2ef61f
2019-08-13 09:07:39 -07:00
tariqibrahim
c46c59360c [k8s.io/client-go]fix typo in eventseries_test.go method
Kubernetes-commit: 06e1b38768ba243d29dcc6a3fe51381d2624a62f
2019-08-12 21:16:23 -07:00
Ted Yu
7d84cadb4f Error code incorrectly hidden in recordEvent
Kubernetes-commit: 31f374f42a2c816c8fb928c5db46474f5fc24b31
2019-08-12 12:11:37 -07: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
wojtekt
6dbe622bff Fix GetReference function
Kubernetes-commit: 399d09ce4ad1728fcecdce09503a07cf1bfecef6
2019-08-05 08:37:55 +02:00
Joe Betz
1522bb2fc6 Replace string concatination with trace fields
Kubernetes-commit: 46a04d50af78e01d06a9879d62cc71fbe892076f
2019-08-02 23:47:24 -07:00
wojtekt
1bed22dd11 Fix selflinks in events tests
Kubernetes-commit: cfa16959e23e4801847b1722f6cc1c73f26e1c3d
2019-08-01 15:23:49 +02:00
Ted Yu
a865205fb0 Store key in TimestampedEntry
Kubernetes-commit: 69fb4e960f7359641b3503b734acc32af6b05e04
2019-07-29 14:53:49 -07:00
Harry Bagdi
bc72a37034 fix: do not allow nil Callbacks functions
If user specifies a nil callback, then error out
rather than crashing at runtime due to a nil reference.

Kubernetes-commit: 9dbbc652efee21bd421db1b1f52235ed20ffb7eb
2019-07-29 11:27:28 -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
Peter Swica
579ad46bdc Kubectl user exec should accept zero-length environment values #652 (#78875)
* Kubectl user exec should accept zero-length environment values #652

* Changing TestValidateAuthInfoExecInvalidEnv to allow for empty strings as Exec values

Kubernetes-commit: f30af9dd6da46f0f01e38b477d455907da9f1b6c
2019-07-25 19:01:41 -04:00
Wei Huang
43e18f2627 Tolerate the case if related event is nil
Kubernetes-commit: 187fc29e3efa915265f31991fe923ab46f0113ce
2019-07-15 23:19:04 -07:00
wojtekt
a553c2c2cc Enable watch bookmarks in reflector
Kubernetes-commit: 175c07f4e6d3a59bb6d9870c4a4a78c41940b2dd
2019-07-04 13:12:08 +02:00
Sukeesh
94daee0164 Cleanup: Audit log and error capitalization
Kubernetes-commit: 346fdbccf0ac06ab3fa0e51ab3b92fdc041bb4cc
2019-06-30 11:56:27 +09:00
Himanshu Pandey
79ec8b81e2 Added custom error message when wrong file is provided with KUBECONFIG (#78185)
* Added custom error message when wrong file is provided with KUBECONFIG

* Modified test case

* Updated the code to warn the missing files

* Renamed the variable

Kubernetes-commit: a5eedcde611658c220c56d2819bf0420aded4ed6
2019-07-10 20:24:54 -07:00
Yassine TIJANI
2c14e0f870 add wojtek-t and yastij as approvers/reviewers for events package
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>

Kubernetes-commit: a2994a296e3a509b40e74d77ae3f42d25a4fb1a5
2019-07-10 21:41:04 +02:00
Yassine TIJANI
36ad1c08c8 add fakes for events package, add startEventWatcher to event interface
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>

Kubernetes-commit: bfa7de0165c911178daaac1991c08f7424b0048f
2019-07-05 14:18:02 +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
zhoulin xie
4e51191303 remove redundant words 'the' in comment
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>

Kubernetes-commit: 77ba845e6d2f0cba81993621531ae5915e7c072b
2019-02-13 22:40:34 +08:00
Yassine TIJANI
540d4de249 set deprecatedEventSource to be backward compatible
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>

Kubernetes-commit: 41e384397cf8505f226dc18f4250b297f98937ab
2019-05-30 13:03:20 +00:00
Yassine TIJANI
0dc1c77c9f clean singleton event when calling finishSeries
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>

Kubernetes-commit: b6663e8d4fceb6f7de7267149341d51966276df8
2019-05-17 16:55:45 +02:00
Yassine TIJANI
f6c046f83a add event_expansion for v1beta1 Events
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>

Kubernetes-commit: e29cb0fb7fbf5470e7caf2b3f1fc3d039bdda4ca
2019-05-17 12:12:19 +02:00
Mike Danese
ba0da5aa4d NewIndexerInformerWatcher: fix goroutine leak
There was some weird queuing going on. The queue was implement by
spawning goroutines that would block on the "ticketer" until it was
their turn to write to the output channel. If N events where in the
watch when the consumer of the watch stopped reading events, N
goroutines would leak. In unit tests of the certificate manager, this
was causing ~10k goroutines to leak.

Fix it with a buffering event processor that uses only one routine and
cancels correctly.

Kubernetes-commit: cafc640bfa0f7362b178b1b896085962d018afe3
2019-05-03 23:50:53 -04:00
SataQiu
185f79a1f6 fix golint failures of client-go/tools/auth client-go/tools/portforward
Kubernetes-commit: a89d75e3b822a13377373b0ef1c1969c69c616ec
2019-05-13 11:13:38 +08:00
Shintaro Murakami
b37f4f2534 Change to use a constant
Kubernetes-commit: 2fcb248354ed5a3bf3154b1a8a0aafa237b2b37c
2019-05-17 18:40:03 +09:00
Mike Danese
e4a7e70861 cleanup some leader election client doc
Kubernetes-commit: 5df7f529f063ab354b050418b40c1f1dd2600175
2019-05-16 12:54:50 -07:00
Ted Yu
3ebee8cab0 Change lock type to write lock in eventBroadcasterImpl
Kubernetes-commit: 94af465819bd41a97b00acf997d5a7e077cbb654
2019-05-17 19:19:42 -07:00
Yassine TIJANI
1a6ae704e2 update LastObservedTime instead of eventTime
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>

Kubernetes-commit: c6b224b16cff3c69b7a0d5b98b02c89777277971
2019-05-17 18:56:38 +02:00
Ted Yu
c3d4ca8db6 Use lock in eventBroadcasterImpl#refreshExistingEventSeries
Kubernetes-commit: 32241b0751c9b9bd5d061eae9a42bd88970d8478
2019-05-17 09:30:54 -07:00
Yassine TIJANI
231e48e9f3 Implementing logic for v1beta1.Event API
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>

Kubernetes-commit: 464a994a10b71c45583f3426fd970291f8a5b756
2018-07-03 22:25:17 +02:00
Jordan Liggitt
9ae57bd75e honor overridden tokenfile, add InClusterConfig override tests
Kubernetes-commit: 7306fb7a89739a2fb48bfeb74595a5daa25060bd
2019-05-15 08:15:02 -04:00
Andy Xie
f2156b6dde enhance leader election doc
Kubernetes-commit: 95f33ce39957e86cc3e81f4c8f325ecd133cbe9d
2019-05-14 10:36:22 +08:00
Mike Danese
459cb72bc6 BoundServiceAccountTokenVolume: fix InClusterConfig
Kubernetes-commit: 4198f28855cbda6dac61408fcba6f2d576a9347c
2019-05-14 09:29:16 -07: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
24499f0573 Add pager.EachPageItem utility function to incrementally process lists
Kubernetes-commit: 6a64ee638780de4dcfa2ab2b4fc739dd23127c49
2019-03-28 15:39:14 -07:00
Ihar Hrachyshka
e413b96486 Fixed log message in client-go
An example of incorrect log message:

{
  "component":"virtctl",
  "level":"info",
  "msg":"Config loaded from fileocp/auth/kubeconfig",
  "pos":"loader.go:359",
  "timestamp":"2019-03-07T18:50:20.923470Z"
}

Note how the resulting message has no characters between the text and
file name.

Kubernetes-commit: 65fb63a15473589f615bdfeb2f35e56414050f94
2019-03-07 08:55:43 -08:00
vivekbagade
060f7d3455 Added config to EventCorrelator in client-go
Added CorrelatorOptions that contains options to change the
defaults in EventSourceObjectSpamFilter and EventAggregator
in EventCorrelator. Added a eventCorrelator property to the
eventBroadcasterImpl to help with this.

Kubernetes-commit: 9d8e6fb1b9cf2d3fac8139a97334287e33ff911f
2019-03-07 10:39:49 +01: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