Commit Graph

4493 Commits

Author SHA1 Message Date
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
Kubernetes Publisher
bad8f77ca6 Merge pull request #126091 from seans3/ws-err-extra-info
Adds extra error information from response to bad handshake error when possible

Kubernetes-commit: f753a444a5e0b245d2cf8433f7d8bb915c12363e
2024-07-23 02:36:42 +00:00
Jefftree
20993758b7 CLE controller and client changes
Kubernetes-commit: c47ff1e1a9aec44f262674eb6cdbabf80512d981
2024-07-21 20:06:03 +00:00
Jefftree
8a2bbd0393 Coordinated Leader Election Alpha API
Kubernetes-commit: 3999b98c8840e41acaa19d94e88f46d1fbb0c1b3
2024-07-21 20:02:00 +00:00
carlory
9dea255e12 Promote VolumeAttributesClass to beta
Kubernetes-commit: 0260c7d023551f85621049ca604a4fd5110ba0a9
2024-07-17 15:55:06 +08:00
mprahl
001900e4e9 Allow calling Stop multiple times on RetryWatcher
This makes the Stop method idempotent so that if Stop is called multiple
times, it does not cause a panic due to closing a closed channel.

Signed-off-by: mprahl <mprahl@users.noreply.github.com>

Kubernetes-commit: a54ba917be42c941edf1a0359dced04e1a5e1d6f
2024-07-16 10:55:26 -04:00
Sean Sullivan
3aff10e3cd Adds extra error information from response to bad handshake error when possible
Kubernetes-commit: f387f0b69acb34143f76275aacb955fabb555bd7
2024-07-14 19:46:16 -07:00
Kubernetes Publisher
a9affb4c9c Merge pull request #125488 from pohly/dra-1.31
DRA for 1.31

Kubernetes-commit: d21b17264e5a554724aa3ad032536630bcfd5b3f
2024-07-22 22:36:56 +00:00
mprahl
2176e80333 Stop the RetryWatcher when failing due to permissions issue
When the client does not have permission to watch a resource, the
RetryWatcher continuously retried. In this case, it's better to send an
error and stop retrying to let the caller handle this case since this is
not a transient error that can be recovered without user intervention.

This is particularly helpful in applications that leverage a user
provided service account and the application needs to notify the user to
set the correct permissions for the service account.

This also accounts for invalid credentials from the watch client.

Signed-off-by: mprahl <mprahl@users.noreply.github.com>

Kubernetes-commit: db2218d16e3fb2a30b21ffa0f307beb515d8394b
2024-07-11 13:50:52 -04:00
Patrick Ohly
a7db3ade62 DRA: new API for 1.31
This is a complete revamp of the original API. Some of the key
differences:
- refocused on structured parameters and allocating devices
- support for constraints across devices
- support for allocating "all" or a fixed amount
  of similar devices in a single request
- no class for ResourceClaims, instead individual
  device requests are associated with a mandatory
  DeviceClass

For the sake of simplicity, optional basic types (ints, strings) where the null
value is the default are represented as values in the API types. This makes Go
code simpler because it doesn't have to check for nil (consumers) and values
can be set directly (producers). The effect is that in protobuf, these fields
always get encoded because `opt` only has an effect for pointers.

The roundtrip test data for v1.29.0 and v1.30.0 changes because of the new
"request" field. This is considered acceptable because the entire `claims`
field in the pod spec is still alpha.

The implementation is complete enough to bring up the apiserver.
Adapting other components follows.

Kubernetes-commit: 91d7882e867da25ae8014f679db32b20e35e89b4
2024-06-18 17:47:29 +02:00
Patrick Ohly
e0bc24e153 DRA: remove "sharable" from claim allocation result
Now all claims are shareable up to the limit imposed by the size of the
"reserverFor" array.

This is one of the agreed simplifications for 1.31.

Kubernetes-commit: 8a629b9f150c1042e2918043e6012a4f22742b19
2024-06-13 18:43:17 +02:00