Commit Graph

4653 Commits

Author SHA1 Message Date
Kubernetes Publisher
51f5488cb9 Merge pull request #115834 from stlaz/remote-uid
RequestHeader authentication: add UID to recognized request headers

Kubernetes-commit: 9f01cd7b28fdbc8a1ceb9ec371fd817551659ee5
2024-09-05 15:34:35 +00:00
Joe Betz
1d3f0e5617 Add dynamic informers tests for field and label selectors
Kubernetes-commit: 6ba426c0c09c30411a7c6121044d7b1db1722776
2024-09-03 12:12:30 -04:00
Patrick Ohly
3d02d42465 client-go/rest: contextual logging of request/response
Logging in rest.Request.Body cannot be made context-aware without an API
change. Such a change is complicated if done in a backwards-compatible
fashion (must change lots of callers in Kubernetes) and prohibitive if not (all
callers of Body would have to pass a context).

Instead, logging of the request body gets moved into the functions which send
the request. This is a change of behavior, but it is limited to log levels >= 8
and thus should have no impact in production.

A request which gets sent multiple times will also log the body multiple
times. This might even be a good thing because it serves as reminder what is
being sent when it is being sent.

While at it, stack backtracing gets enhanced so that the caller of the REST API
is logged and tests for the new behavior get added.

Kubernetes-commit: 57f9b7c7a2412865e7817dbf7638881b00ac9721
2024-08-29 19:44:55 +02:00
Jordan Liggitt
1b9b709183 Update vendor
Kubernetes-commit: 745ae75a15cad2f1c5da5518c00f2eb366ffb786
2024-08-17 21:42:00 -04:00
Jordan Liggitt
a398951ea1 Implement limited merge function
Kubernetes-commit: 4d8cbad58e21e701af735c5ffa1a9fd3393de096
2024-08-17 21:27:26 -04:00
Jordan Liggitt
56b7eaf344 Narrow merge interface to merging the same types
Kubernetes-commit: 9fde1c6a85c1390c7be7705385eb99b3ebc8e06a
2024-08-17 20:43:53 -04:00
Jordan Liggitt
b3dca7eb8a Isolate mergo use, add test coverage and error checking
Kubernetes-commit: 3b3886a4509a83aff0afe7ad42da9b7819a17aed
2024-08-17 16:42:11 -04:00
Andy Goldstein
da3ab4e935 Move ncdc to emeritus
I am moving myself to emeritus as I am now firmly on the end-user side
of things.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>

Kubernetes-commit: 3ab816dcabf37acda33c665ab5aa85f1f6163bc1
2024-08-17 13:00:07 -04:00
Stephen Kitt
e996fa7a55 Drop references to auth-path and kubernetes_auth
These are long gone, removed in 2016:
* AuthPath removal: https://github.com/kubernetes/kubernetes/pull/29216
* Flag removal: https://github.com/kubernetes/kubernetes/pull/40048

This removes the remnants from clientcmd, mostly in the comments
describing how the configuration is loaded.

Since getServerIdentificationPartialConfig can no longer fail (it
copies fields from one struct to another), this drops the error
return, along with the error handling in the caller.

Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: 8a8238ba7f850241de9c5cc4b22fa1a6b6a19480
2024-07-05 14:55:44 +02:00
liyuerich
68d318f3aa drop deprecated json/yaml newSerializers, use json.NewSerializerWithOptions instead
Signed-off-by: liyuerich <yue.li@daocloud.io>

Kubernetes-commit: 3c9309db463679c348934429d8487d190ed5e64a
2024-05-29 19:00:00 +08:00
Stanislav Láznička
9dd4d6ed78 client-go: add the UID to the auth-proxy roundtripper
Kubernetes-commit: 2cc0370169ea1fcf45429f9586e0ffd4ab32ed26
2023-02-16 14:01:53 +01:00
Kubernetes Publisher
4fca7081f8 Merge pull request #127011 from jpbetz/format-only-imports
gengo performance: Speed up update-codegen.sh by switching to FormatOnly in gengo

Kubernetes-commit: 95956671d8da7783a726133709b8085f56dda052
2024-09-04 01:17:35 +01:00
Joe Betz
2b735405b2 generate
Kubernetes-commit: 2595aa13098355414a558b2d97c58d505ca7b6c2
2024-09-03 14:25:56 -04:00
Kubernetes Publisher
bc8a8ba48a Merge pull request #127035 from alvaroaleman/rename-TypedNewDelayingQueue
Rename TypedNewDelayingQueue to NewTypedDelayingQueue

Kubernetes-commit: df577d7fbc4c76b4b660007565fae86b48a1086f
2024-08-31 19:33:10 +00:00
Alvaro Aleman
c311da2251 Rename TypedNewDelayingQueue to NewTypedDelayingQueue
This change renames NewTypedDelayingQueue to NewTypedDelayingQueue to
stay consistent with the naming scheme in the package. A
NewTypedDelayingQueue constructor is kept for backwards compatibility
but marked as deprecated.

Kubernetes-commit: 45da5dc30ecf0ba4c4b44befd96b8617278c496b
2024-08-31 12:11:20 -04:00
Kubernetes Publisher
388eba62e1 Merge pull request #127023 from aimuz/fix-lead
leaderelection: replace deprecated wait.PollImmediateUntil with wait.PollUntilContextTimeout

Kubernetes-commit: 4cfdad0935cfb796d4219dbabe8eba669614df39
2024-08-30 23:33:14 +00:00
Kubernetes Publisher
6c241d51b1 Merge pull request #127001 from skitt/applyconfiguration-gen-ambiguous
Handle ambiguous fields in applyconfiguration-gen

Kubernetes-commit: ed75e55c44f7bfbcf93757b86ae57eaceb06245a
2024-08-30 19:33:15 +00:00
Kubernetes Publisher
d50e2a9641 Merge pull request #126265 from tnqn/fix-watch-error
Enrich the error returned from Request.Watch method

Kubernetes-commit: fd58143ed2569c7eb86f46649803d1d13abc9583
2024-08-30 15:33:12 +00:00
aimuz
4379fade33 leaderelection: replace deprecated wait.PollImmediateUntil with wait.PollUntilContextTimeout
This commit refactors the `renew` function in the leader election package to replace
the deprecated `wait.PollImmediateUntil` with `wait.PollUntilContextTimeout`.
This change simplifies the context handling by removing the need for an additional
timeout context and its cancellation.

The previous implementation created a timeout context for each retry period,
which added unnecessary complexity. The new implementation directly passes the parent
context to the retry function, ensuring that the timeout is handled within `PollUntilContextTimeout`.

This change also ensures that the context passed to `tryAcquireOrRenew` and
`tryCoordinatedRenew` is consistent, improving the readability and maintainability of the code.

Kubernetes-commit: 3d2f498aa31cb2e90bcfc372b7930aed0604fbef
2024-08-30 19:25:45 +08:00
Kubernetes Publisher
9db830e3b0 Merge pull request #126727 from jpbetz/fix-fake-apply-name
Stamp fake client apply reuqests with name from action

Kubernetes-commit: 45804907d2025747452ac2573a60d330cc930a49
2024-08-29 19:33:50 +00:00
Stephen Kitt
d7a6826d37 Run codegen
Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: 689d6ef7a3a44405909f6007b3a91eff458b95a2
2024-08-29 18:16:41 +02:00
Kubernetes Publisher
c7951255f6 Merge pull request #126954 from deads2k/retry-http2
automatically retry GET requests when http2 connection lost

Kubernetes-commit: aa4515344794526547b8344513f7785e1c46841d
2024-08-28 23:39:23 +00:00
Kubernetes Publisher
0b9a7d2f21 Merge pull request #124747 from l-technicore/update_event_spam_key
Enhance Event Spam Key to Preserve Important Events During Reconciliations

Kubernetes-commit: ad879205486a669dbaa5f5c49c247db7ea33fd33
2024-08-28 07:36:19 +00:00
Kubernetes Publisher
dec9eaa92f Merge pull request #126787 from Jefftree/update-kube-openapi
Bump k8s.io/kube-openapi and k8s.io/gengo

Kubernetes-commit: f1a922c8e6f951381450ee3c2922ca018f14a82e
2024-08-27 23:33:26 +00:00
David Eads
d69e298e04 automatically retry GET requests when http2 connection lost
Kubernetes-commit: 332a094e231942b8b6c2052d078241ddc698fe74
2024-08-27 16:32:32 -04:00
Jefftree
aa547ee1e5 re-vendor k8s.io/kube-openapi
Kubernetes-commit: ea2bdb6334ec1a2821a96163d83480d5fdb1861b
2024-08-27 01:58:39 +00:00
Kubernetes Publisher
46965213e4 Merge pull request #126716 from stlaz/tlscachekey_comparable
ensure tlsCacheKey is strictly comparable to avoid runtime panics

Kubernetes-commit: 4f10b245031193c1c1679573201810ffac9191a4
2024-08-20 03:33:19 +00:00
Kubernetes Publisher
79827ce1df Merge pull request #126038 from mprahl/retry-watcher-forbidden
Stop the RetryWatcher when failing due to permissions issue

Kubernetes-commit: e54c8ef2024e638d721242224f6f925b15ee43f5
2024-08-19 15:33:19 +00:00
Joe Betz
86c96117c6 Use Fatalf for non-recoverable errors in test
Kubernetes-commit: 5784e58446b7dd2aca0af0e84e43395c9391ae03
2024-08-19 11:18:04 -04:00
Kubernetes Publisher
78c1586020 Merge pull request #126655 from tklauser/log-spelling-fix
client-go: fix typo in leaderelection error log message

Kubernetes-commit: de521a91910e67ee3bcee006e75f694391b1271d
2024-08-18 22:25:33 +00:00
Joe Betz
908d899011 Stamp fake client apply reuqests with name from action
Kubernetes-commit: 5f1c7ae6346f9028fef77b76e5555aa37f1fc39a
2024-08-15 21:24:28 -04:00
Stanislav Láznička
d63a65fbe7 ensure tlsCacheKey is strictly comparable to avoid runtime panics
Kubernetes-commit: 12ae218bfe8c194786737220759cbb2e8e3e3a98
2024-08-15 15:50:22 +02:00
Kubernetes Publisher
690fd5274d Merge pull request #126545 from yangjunmyfm192085/updatepersistentVolumeClaimRetentionPolicy
Update incorrect description of persistentVolumeClaimRetentionPolicy

Kubernetes-commit: 6a478b4306ea9ae3b8f86bd1ef71072d9a03be22
2024-08-14 06:12:05 +00:00
Tobias Klauser
ae43527480 client-go: fix typo in leaderelection error log message
Kubernetes-commit: 99a90df3d0403315f26d643b90ab6339c22602c8
2024-08-13 11:21:57 +02:00
杨军10092085
1a951c2887 Updated incorrect description of persistentVolumeClaimRetentionPolicy
Kubernetes-commit: 56bbae4807989cd43eff17cf9fa93f7b54c087bd
2024-08-05 21:30:25 +08:00
Kubernetes Publisher
71959c526d Merge pull request #126405 from sttts/sttts-sync-informerfactory-start
Call non-blocking informerFactory.Start synchronously to avoid races

Kubernetes-commit: ba6141a1457cf8dad08fb08724b390f9dfd84489
2024-07-27 10:50:48 -07:00
Jefftree
b6f7bdf3b8 informers: add comment that Start does not block
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>

Kubernetes-commit: cd69335542fd961b69b4e83b6433d1b40d2f4439
2024-07-27 15:47:24 +00:00
Dr. Stefan Schimanski
f71a5cc5d3 Call non-blocking informerFactory.Start synchronously to avoid races
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>

Kubernetes-commit: c7a1fa432a87579895eac4b3873162d5f1dba7f5
2024-07-27 16:13:16 +02:00
Kubernetes Publisher
4536e5a391 Merge pull request #124012 from Jefftree/le-controller
Coordinated Leader Election

Kubernetes-commit: 5f5c02da51cd3146f30c6ee56013c983f4999d9c
2024-07-25 21:07:49 +00:00
Kubernetes Publisher
93c6a5bf50 Merge pull request #126353 from liggitt/fix-vendor
Fix verify-vendor script to check all go.mod and go.sum files

Kubernetes-commit: 9edabd617945cd23111fd46cfc9a09fe37ed194a
2024-07-25 17:07:42 +00:00
Sebastiaan van Stijn
6a9911a398 revendor dependencies
I was workinng on updating a dependency, and noticed that running
hack/update-vendor.sh resulted in a diff. Comitting the result
as a PR.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Kubernetes-commit: aeb607443dd9b8ee378ee10209e9b446256f3ee2
2024-07-25 08:52:23 +02:00
Kubernetes Publisher
fe54892e0c Merge pull request #126243 from SergeyKanzhelev/devicePluginFailures
Implement resource health in pod status (KEP 4680)

Kubernetes-commit: 5af1710d90d2396f6305c73fdf7df3a1be0c2fd0
2024-07-24 05:07:09 +00:00
Jefftree
825f52e194 Change PingTime to be persistent
Kubernetes-commit: 0c774d0b1f79b0b0a6d73102a78c84853220f036
2024-07-23 19:19:12 +00:00
Jefftree
f45c45195a fix ordering issue in candidates
Kubernetes-commit: e1ea24a171ca6ba2d0f184abbd019ab3cf4a93c4
2024-07-23 17:09:37 +00:00
Jefftree
18dd587a4b feedback: leasecandidate clients
Kubernetes-commit: fac758164029e278e9bda924090ed078bb6514c8
2024-07-23 14:28:08 +00:00
Dr. Stefan Schimanski
1f27757b2f Review feedback
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>

Kubernetes-commit: 68226b0501996fc86c9c2bddb7d61e6a64c91304
2024-07-23 14:52:25 +02:00
Quan Tian
009514ecc1 Enrich the error returned from Request.Watch method
The Error method of the error returned from Request.Watch was "unknown"
even the server returned clear message in the Status struct. It was
because Request.Watch used the Result's err member directly, which is an
unstructured error from the response which the Result object may use if
the caller did not return a structured error.

The patch fixes it by calling the Result's Error method instead, which
returns the structured error when it's present.

It also removes the wrong expectation about events.

Kubernetes-commit: 596c5696c64023808af164284263647d795b0ac2
2024-07-22 17:13:43 +08:00
Sergey Kanzhelev
79fd7abf82 generated files
Kubernetes-commit: 2253b53b585e3405c5ce2dda2921db3a0afa02c9
2024-07-22 05:20:58 +00:00
Kubernetes Publisher
ac9204c619 Merge pull request #126145 from carlory/kep-3751-api
[KEP-3751] Promote VolumeAttributesClass to beta

Kubernetes-commit: c2fdeca4ab81336daf20c91b810c9685918c3d58
2024-07-24 01:07:04 +00:00
Kubernetes Publisher
dcfcc90795 Merge pull request #126125 from mprahl/stop-idempotent
Allow calling Stop multiple times on RetryWatcher

Kubernetes-commit: fc03f3e74c3d891e62b347c518b3197b62e9532c
2024-07-23 20:03:59 +00:00