Commit Graph

367 Commits

Author SHA1 Message Date
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
Brian Pursley
d4a54d1ba8 Changed kubectl config view to redact token
Kubernetes-commit: 6fad4ee5e5f5fa6fbf38e88f165b012fa0ae5795
2020-03-17 15:13:50 -04:00
Alvaro Aleman
6b7675c693 Utilerrors.Aggregate: Allow using with errors.Is()
Kubernetes-commit: 212190e25e18600bbca2eb5c77aa3fe5bcc55af1
2020-02-24 15:15:04 +01:00
Mike Spreitzer
49f8c8f17a More refinement of comments and parameter names for informers
Removed the incorrect promise of coherency in the answer to a query to
an informer's local cache.  Removed the definition of "collection
state", because it was only used in the now-removed promise.  Added a
remark about ordering of states that appear in an informer's local
cache.

Brushed up the commentary on resync period.  Changed the relevant
parameter of NewSharedInformer to have the same name as the
corresponding parameter to NewSharedIndexInformer.

Kubernetes-commit: b8e2ad5926c3a6872422ad25cf9867e10e052a7d
2020-01-26 02:43:33 -05:00
Monis Khan
7ba7043ddf Use the same default namespace across event recorders
Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: 167d6a2c8b00413cb52841ee49dd042bfb7d10c9
2020-03-04 13:49:33 -05:00
Maciej Szulik
3eda474fce Provide more verbose empty config error based on the context
Kubernetes-commit: 07dc17ffd9aadd9918511334e13b02dc817828a5
2020-03-03 18:42:19 +01:00
David Eads
72322d0c6d stop defaulting kubeconfig to http://localhost:8080
Kubernetes-commit: b19ad9e7a78fea0ecdffe7aa53bbe309d9d346ee
2018-04-12 09:42:25 -04:00
David Eads
32fece0e08 update override behavior for kubectl --tls-server-name
Kubernetes-commit: 9dcbc0bf909a794cf77a801bfd29e306791b1e24
2020-03-03 13:16:50 -05:00
Suresh Kumar Ponnusamy
6a6b2af8ea Support TLS Server Name overrides in kubeconfig file
Signed-off-by: Suresh Kumar Ponnusamy <suresh.ponnusamy@freshworks.com>

Kubernetes-commit: 37c81ed79ac6836bce4b96f888aa407dc18d747c
2019-08-28 10:51:14 +05:30
jennybuckley
2d3138825e Improve rate limiter latency logging and metrics
Kubernetes-commit: 2bcf99f05fdc47fb4bc3601b9134408483f59773
2020-02-13 13:32:12 -08:00
Ted Yu
d6bfb32c17 Pass context to tryAcquireOrRenew
Kubernetes-commit: c049f30ef2a83172f46a587ddaf2104b39df8301
2020-02-10 12:31:24 -08:00
Jordan Liggitt
b0779d525a Shrink mutation detection critical section
Kubernetes-commit: 12abf03f6b4a60fa61773acd21dfb440ff10f699
2020-02-13 22:22:14 -05:00
Harry Zhang
1df276a7c6 add exponential backoff with reset to reflector
Kubernetes-commit: f1248163ff4dc3cf164284bf255c10b6b538aa66
2020-02-03 15:32:51 -08:00
Jordan Liggitt
08cc53159f Treat replaced events that didn't change resourceVersion as resync events
Kubernetes-commit: a6caa0a4726ba97737056175494516367cf98cae
2020-02-08 16:30:01 -05:00
Mike Danese
6659ae5216 generated: run refactor
Kubernetes-commit: 25651408aeadf38c3df7ea8c760e7519fd37d625
2020-02-08 12:30:21 -05:00
Mike Danese
60a0346672 generated: run refactor
Kubernetes-commit: 3aa59f7f3077642592dc8a864fcef8ba98699894
2020-02-07 18:16:47 -08:00
Tim Allclair
8462896174 Ensure testing credentials are labeled as such
Kubernetes-commit: 9d3670f3586c98c02cdca93b7c98dd91fc0b87bd
2020-02-04 10:36:05 -08:00
wojtekt
0e2dbbf70a Switch pager to return whether the result was paginated
Kubernetes-commit: 5dcf08c1993718e94cf6537af50e0a411dd2878c
2020-01-28 09:39:27 +01:00
wojtekt
5534e24283 Avoid thundering herd on etcd on masters upgrade
Kubernetes-commit: 773d3583bcb7a2ac39c772a9861978d81db0df2f
2019-12-30 13:53:28 +01:00
Roger Torrentsgeneros
69becbbf29 fix: missing variadic dots
Kubernetes-commit: 9bfcc6144e5ad24ffa2e903f8ee32405cda8d942
2020-01-30 13:08:14 +01:00
Mike Danese
b136e9eb2b refactor
Kubernetes-commit: d55d6175f8e2cfdab0b79aac72046a652c2eb515
2020-01-27 18:19:44 -08:00
Mike Spreitzer
cc22aafc1f remove unused layer of loop structure in processorListener::run
Also updated the comment inside processorListener::run, to restore
accuracy about how long the delay is.

Kubernetes-commit: d2ad469abbb1122cbbd772e15767817cd771f9f6
2020-01-20 11:52:44 -05: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
Casey Callendrello
802190f49e client-go/cache/testing: add ability to simulate watch disruption
This adds ResetWatch() to the FakeControllerSource, which lets the
controller simulate a re-list-and-watch.

Kubernetes-commit: 5aacacbdf000cee2d0ec548ee4afe564f35c60bf
2019-12-06 22:19:42 +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
4aedce0891 gofmt reflector.go
Kubernetes-commit: 729337ec7e4251708b75f45ad40b7fa55ad14dd5
2020-01-07 08:56:31 -05:00
Mike Spreitzer
a1b3b98c4b Clarified comment on DeltaFIFO::Replace
Kubernetes-commit: ae53a008cb372f7301e302ee982269630e964b12
2020-01-07 02:40:01 -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
Mike Spreitzer
261b8a00e4 Reworded comment on requestedResyncPeriod
Tried to make it clearer.

Kubernetes-commit: 2ea338b63f2191d859ac68fbba74c93c1d7bc998
2020-01-06 13:10:39 -05:00
Mike Spreitzer
8454aaf1be Noted divergence between requestedResyncPeriod and resyncPeriod
Kubernetes-commit: eef49c965f471d575aef8de5f071ffc6fd31c44d
2020-01-06 01:56:52 -05:00
Mike Spreitzer
1f6e3b32af Started commenting processors
Kubernetes-commit: 5546d9f12f266a082805ad3a2293fe04e0029c78
2020-01-06 01:49:29 -05:00
Mike Spreitzer
2f9f325a3b Fix tests and improve comment on NewDeltaFIFO
Kubernetes-commit: 0eca8ae9cdbbbe0e5bf56f9931acdaa97cea91af
2020-01-03 01:01:05 -08:00
Mike Spreitzer
bad9a45b33 Fixed assignment statements
Kubernetes-commit: 1d65f1b5c3977362fb5a32b9cfe5b9930fabf16a
2020-01-03 00:47:19 -08:00
Mike Spreitzer
0421cde51b Revised comments about f.knownObjects and added tests for Replace
Kubernetes-commit: 89c615f9c448503b674a0d61bfa8e413cefa4104
2020-01-03 00:44:02 -08:00
Mike Spreitzer
c26559b124 Updated comments on internal abstractions in client-go/tools/cache
The comments on Store and Queue and the FIFOs ceased being accurate
long ago.

Kubernetes-commit: 7a7ccb797e0c977c8049c1490f5a1f92f0bfbbb2
2020-01-02 01:53:17 -08:00
matte21
7d44382a3c Reword modifications for clarity
Kubernetes-commit: 21f59c99232afeae05dcdb4f2d1d156cda6a8a77
2019-12-31 09:48:28 +01:00
matte21
ce6197e865 Fix error in periodic resyncs description
Make it clear that periodic resyncs fire update notifications, not
create notifications as the old comments incorrectly stated.

Kubernetes-commit: 3ae8c864de24a2ad42321c9cbd71099a2b6dcef3
2019-10-28 14:23:37 +01:00
matte21
85843e6e02 Clarify that OnUpdate can mask delete and recreate
Kubernetes-commit: ff543ddfc09adf3d0abdf42f9d9fbd57c3ab4b43
2019-10-28 14:12:22 +01:00
mattjmcnaughton
3ada5c0eb8 Remove recorder.PastEventf method
The `recorder.PastEventf` method wasn't actually working as advertised.
It was supposed to accept a timestamp, which would be used when
generating the event. However, as the
[source code](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/client-go/tools/record/event.go#L316)
shows, this `timestamp` was never actually used.

In other words, `PastEventf` is identical to `Eventf`.

We have two options: one would be to fix `PastEventf` so that it works
as advertised. The other would be to delete `PastEventf` and only
support `Eventf`.

Ultimately, I could only find one use of `PastEventf` in the code base,
so I propose we just delete `PastEventf` and convert all uses to
`Eventf`.

Kubernetes-commit: 92940fa80d67593c7a2333267da4424c8b45ac88
2019-12-30 11:55:47 -05:00
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
Ted Yu
efe42e9182 Allocate map when out points to nil map
Kubernetes-commit: 53080bda9c95db33227b02b5b7df7e7737a2904e
2019-12-18 14:17:48 -08:00
Samuel Davidson
41735bf478 Changed Kubelet client and serving cert TTL/Expiry certs to use gaugefunc for calculating time remaining.
Kubernetes-commit: aba0b315269dab469694af7fca879438a7f87e41
2019-12-03 16:01:56 -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
Jordan Liggitt
a2a1463427 Test writing configurations with numeric names
Kubernetes-commit: 1f2feb2e7ec307fafa615e001ccb9bbac7d273db
2019-11-17 14:36:52 -05:00
Samuel Davidson
775f4ddf38 Added rest client metrics for client TTL and rot. (#84382)
* Added rest client metrics for client TTL and rot.

* Fixed foo bar comment, added nil checks

* Moved rotation observation inside of old cert nil check block

* Fixed rotation age logic.

* fixed BUILD for exec plugin package

* fixed null pointer dereference in exec.go

* Updated metric name, bucket, used oldest cert.

Kubernetes-commit: 9dcb3bfcff2024e4690d70262cad14668b1f2507
2019-11-22 17:29:30 -08: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
Luke Shumaker
f5d68cde58 client-go/tools: Docs: Clarify what's "old" core/v1 and what's "new" events/v1beta1
Kubernetes-commit: 2c4bb0fa4db88462a61995d9179fad801b00d69d
2019-11-12 08:30:24 -05:00