Commit Graph

408 Commits

Author SHA1 Message Date
Derek Carr
475bc66604 Improve ability to debug Events e2e failure
Kubernetes-commit: 4502fa3cfcd6025ba434f8626102e56d09d95b7e
2020-09-03 15:01:33 -04:00
azush26
5f6a1b08cd modify the warning log format from %d to %v
Kubernetes-commit: ac1168e0e922ccd32b0fcc3d3aecac8920cedbda
2020-08-12 16:05:59 +09:00
Kevin Delgado
4d01b584c3 Add exp backoff for connection refused errors
Currently when ListAndWatch() receives a connection refused error, it is
assumed to be due to the apiserver being transiently unresponsive. In
situations where a controller is running outside the k8s cluster it's
controlling, it is more common for the controller to lose connection
permanently to the apiserver and needs to exponentially backoff its
retry rather than continously spamming logs with Watch attempts that
will never succeed.

Kubernetes-commit: 1ff789f2bb9bf7fbb3df35977bc249c0dd019d31
2020-08-25 19:15:21 +00:00
janeczku
47f16e33aa Fixed reflector not recovering from "Too large resource version" errors with API servers 1.17.0-1.18.5
Kubernetes-commit: e1f4bfe1db8d3975bf626c2c8536dd8076aeb7d4
2020-08-28 21:17:27 +02:00
gobomb
330cb14339 let panics propagate up when processLoop panic
Kubernetes-commit: 19a3ca2c289b6f3dc8cd495e3db0d347b5a3b774
2020-08-03 09:30:39 +00:00
caozhiyuan
fa1e013ed0 reduce type conversion and correct variable name
Kubernetes-commit: 13468442bfbdf69a6e6690497fce427317cff790
2020-07-29 19:18:05 +08:00
Nikhita Raghunath
480d796592 apimachinery: remove inactive members from OWNERS
Kubernetes-commit: db495ea9837cf840639a4e02085253fb341e12b5
2020-07-11 19:28:24 +05:30
Mike Spreitzer
53f29dc721 Replaced repair with returning error, in delta_fifo.go
When dedupDeltas does the impossible and the key is already queued,
return an error rather than maintain the data structure invariants.

Kubernetes-commit: a39481a4f6cf33f9bf4555adcffa28077863e7a9
2020-07-08 01:15:51 -04:00
Mike Spreitzer
a166e2578b Repair instead of panic when data corruption detected in DeltaFIFO
Kubernetes-commit: abcd0f82c5634c7a23b9390172b7c6ae907d84f7
2020-07-02 23:23:59 -04:00
Mike Spreitzer
826338c319 Remove contemplation of invariant violations from delta_fifo.go
Some comments and code incorrectly contemplated violating the
invariant that a keys is in `f.items` if and only if it is in
`f.queue`.

Also fixed up some comment wording.

Kubernetes-commit: 5efd727d112206ef9a8ede93c5878b0d40707ae9
2020-06-09 18:57:28 -04:00
W. Trevor King
42b7b70457 leaderelection: Remove doubled space in "attempting to acquire leader lease" log
The extra space was introduced in 5b854e7b17 (say which lease is being
acquired, 2018-01-16, #58341).

Kubernetes-commit: e5347d48f9e67776984fbe284f03aefc425a951d
2020-08-05 14:31:39 -07:00
Chris Mark
ffcde95237 Document blocking behaviour of RunOrDie and Run
Kubernetes-commit: b09c01c9e2a35b8f91fad319db77bdf8963c05f1
2020-07-30 17:04:57 +03:00
Jordan Liggitt
e6a0f4acba Fix int->string casts
Kubernetes-commit: 124a5ddf725c4862520d8619017cac9db7a03522
2020-07-24 11:13:07 -04:00
Chelsey Chen
51d7273066 Update conversion between ReportingController and Source.Component
Kubernetes-commit: e010436e2acc96d710620a91ceaaa86becca4060
2020-07-07 13:38:48 -04:00
Andrew Keesler
11ef39e643 Fix typo: authentiction -> authentication
Signed-off-by: Andrew Keesler <akeesler@vmware.com>

Kubernetes-commit: eefed60e2300bdb9f5827e2da63d6949bb080d4c
2020-05-21 20:13:20 -04:00
Andrew Keesler
6b620f1777 exec credential provider: add install hint
This commit adds the ability for users to specify an install hint for
their exec credential provider binary.

In the exec credential provider workflow, if the exec credential binary
does not exist, then the user will see some sort of ugly

  exec: exec: "does-not-exist": executable file not found in $PATH

error message.  If some user downloads a kubeconfig from somewhere, they
may not know that kubectl is trying to use a binary to obtain
credentials to auth to the API, and scratch their head when they see
this error message.  Furthermore, even if a user does know that their
kubeconfig is trying to run a binary, they might not know how to obtain
the binary.  This install hint seeks to ease the above 2 user pains.

Signed-off-by: Andrew Keesler <akeesler@vmware.com>

Kubernetes-commit: 94e2065df2eef3b198942efb156ef6e27abcc6f9
2020-05-20 15:20:20 -04:00
Chelsey Chen
c9818a9a30 Remove DeprecatedSource assignment to avoid validation failure
Kubernetes-commit: e54ad20f057f1ca4e94552b9373f2762a39b3fd2
2020-07-02 12:53:25 -04:00
Chelsey Chen
67fdd63515 Switch event recorder to use events.k8s.io/v1
Kubernetes-commit: ade242288346d968ab97f42ffb30e0855e235afc
2020-06-16 18:25:18 -04:00
Benjamin Elder
d68fd20f32 remove david-mcmahon from reviewers
Kubernetes-commit: d8f2b131b52b5f296818da50e66bba51a1e05c01
2020-06-30 14:06:58 -07:00
Benjamin Elder
1a4844dbb1 eparis to emeritus
Kubernetes-commit: 2abc8afececeadad26c6bb90d3b096f2b8008131
2020-06-30 09:50:44 -07:00
Maciej Szulik
18374dcbea Add the ability to opt-out from config lock file
Kubernetes-commit: 3574d88e22d68fc3291bf1c8432326d0e14fa3bd
2020-06-25 17:29:32 +02:00
wojtekt
ec46b97af4 Fix bug in reflector not recovering from "Too large resource version" errors
Kubernetes-commit: 3704174f95c7311e025284ef30bb56945fa6e7cc
2020-06-26 09:45:29 +02:00
Dr. Stefan Schimanski
8f2b164e09 clientcmd: fix NPE in NewNonInteractiveDeferredLoadingClientConfig with nil overrides
Kubernetes-commit: 945991b40275b096707c7b9eb0f192e99bd15b6d
2020-06-26 15:59:17 +02:00
Kobayashi Daisuke
b5d4191149 Replace StartLogging(klog.Infof) with StartStructuredLogging(0)
Kubernetes-commit: 4ae11dac2e2cc8594c528a679db5861c0926b514
2020-06-09 12:01:45 +09:00
Kobayashi Daisuke
55768fa31f Add an function for Structured Logging function into EventBroatcaster
Kubernetes-commit: dcaa8d7126cb711b9b93ef10fa84364dac8a22d3
2020-06-09 10:10:41 +09:00
Kobayashi Daisuke
10e6fa29f1 Migrate log to klog.InfoS for staging/src/k8s.io/client-go
Kubernetes-commit: ed1b83c6de5ccc62494e7f0e580cd743ad9a5934
2020-06-03 11:13:54 +09:00
Chelsey Chen
a8a31f0d9b Move fallback of Event API into new event lib
Kubernetes-commit: e0e12f25c9ccd33f5578fddef79d93eb7b62ea0c
2020-06-04 21:36:04 -04:00
Mikhail Mazurskiy
afa880fea1 Fix data race on config.clientConfig
config.clientConfig can have an unlocked read
and a locked write

Kubernetes-commit: 609da52afaf6395d738f529c78daadc05e619f68
2020-06-15 21:53:11 +10:00
Qing Ju
89cf2be62c Added clarification to delta FIFO doc
Kubernetes-commit: c71272b0c7ac09991ba215e7bc5a8af8334c4b17
2020-05-25 19:48:10 -07:00
RainbowMango
78a7be5457 fix a client-go crash handler not working issue.
Kubernetes-commit: 4a4d1947b031aa301be6046c641faae275f5223b
2020-05-29 14:41:27 +08:00
dopelsunce
73aa499de0 Fix race condition between Pop and Close FIFO queue
Fixes: kubernetes#90581 (the first part)

When `Close()` is invoked on an empty queue, the control loop inside `Pop()` has a small chance of missing the signal and blocks indefinitely due to a race condition. This PR eliminates the race and allows the control loop inside any blocking `Pop()` to successfully exit after Close() is called.

Kubernetes-commit: d8b90955519d10b99415515f8314dd6d35caae8d
2020-05-06 19:01:13 -05:00
Qing Ju
aea2fc6906 Polished up HasSync comment
Kubernetes-commit: 168d0848299a625b9d4d2b85923efc60ed7de734
2020-05-16 20:41:07 -07:00
Davanum Srinivas
75fea27a27 switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 442a69c3bdf6fe8e525b05887e57d89db1e2f3a5
2020-04-17 15:25:06 -04:00
wojtekt
16393a6dc7 Remove ListWatchUntil
Kubernetes-commit: ead12b02fed9e8c3a8ebf693f71fa452115d923b
2020-05-07 20:21:46 +02:00
Mike Danese
0caa50056a rest.Config: support configuring an explict proxy URL
With support of http, https, and socks5 proxy support. We already
support configuring this via environmnet variables, but this approach
becomes inconvenient dealing with multiple clusters on different
networks, that require different proxies to connect to. Most solutions
require wrapping clients (like kubectl) in bash scripts.

Part of: https://github.com/kubernetes/client-go/issues/351

Kubernetes-commit: f3f666d5f1f6f74a8c948a5c64af993696178244
2019-05-03 13:50:17 -07:00
wojtekt
c16c96a7f1 Request for bookmarks in RetryWatcher
Kubernetes-commit: 7a65760f6e914e5421b443980831b2965c6954c7
2020-05-06 19:37:57 +02:00
Maciej Szulik
71473e9b7b Revert "stop defaulting kubeconfig to http://localhost:8080"
This reverts commit b19ad9e7a78fea0ecdffe7aa53bbe309d9d346ee.

Kubernetes-commit: a871738c86a0bdf7c3b8924d1932e6f2c85ea8d8
2020-04-17 16:37:15 +02:00
zhouya0
1c7ee45b9b Fix kubectl version should print version info
Kubernetes-commit: 948f4de2dbba3affca2de460d836158cbde5db78
2020-04-07 15:18:38 +08:00
Jordan Liggitt
33c1f9f2a4 Fix client watch reestablishment handling of client-side timeouts
Kubernetes-commit: 343c1e7636fe5c75cdd378c0b170b26935806de5
2020-03-30 10:36:01 -04: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
Ted Yu
1ff0856e81 Check Annotations map against nil for ConfigMapLock#Update()
Signed-off-by: Ted Yu <yuzhihong@gmail.com>

Kubernetes-commit: 086d6ae9bbbe95e0740e7dd44fa08c31409f8bec
2020-04-03 16:47:19 -07: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
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