Commit Graph

4895 Commits

Author SHA1 Message Date
Joe Betz
b5002f17ec Update OpenAPI and fix openAPI tests to handle unexported jsonreferences
Co-authored-by: Alexander Zielensk <alexzielenski@gmail.com>

Kubernetes-commit: 700e3b566428bca46d2d37514c8fd7af60c7ff34
2024-10-25 13:51:03 -04:00
Joe Betz
5295d256f6 generate code
Kubernetes-commit: fe3a7f529153db690ac8588ee9c31bdfda0ed5f8
2024-10-25 13:46:37 -04:00
Ben Luddy
15af21a2ae Fall back to JSON request encoding after CBOR 415.
If a client is configured to encode request bodies to CBOR, but the server does not support CBOR,
the server will respond with HTTP 415 (Unsupported Media Type). By feeding this response back to the
RESTClient, subsequent requests can fall back to JSON, which is assumed to be acceptable.

Kubernetes-commit: 1745dfdd154b1a838765e70b81c861c644bfcffe
2024-10-22 17:40:08 -04:00
Ben Luddy
cff56219d9 Support application/apply-patch+cbor in patch requests.
Kubernetes-commit: 37ed906a33211c7d578cab2d681941ebfd2f2f23
2024-10-22 16:08:24 -04:00
Jan Safranek
f0b2234e53 Regenerated API
Kubernetes-commit: 3867cb40add0cfc41157e9fd11f2377cda7d3770
2024-10-03 11:13:07 +02:00
googs1025
1b8aded77b chore(leader-election): modify leader-election comment to OnStoppedLeading callback is always called when the LeaderElector exits, even if it did not start leading.
Kubernetes-commit: 7d2fbc7cfd49bca7d58160ed25dfd1f838629bb9
2024-09-30 09:38:10 +08:00
Abu Kashem
95fc3d7e88 api: run codegen
run 'make update' to code gen for changes in meta/v1 DeleteOptions

Kubernetes-commit: aff05b0bcad2b62730e101067a04ffc75a96a41b
2024-09-23 13:29:15 -04:00
Patrick Ohly
d32193115c DRA API: AdminAccess in DeviceRequestAllocationResult
Drivers need to know that because admin access may also grant additional
permissions. The allocator needs to ignore such results when determining which
devices are considered as allocated.

In both cases it is conceptually cleaner to not rely on the content of the
ClaimSpec.

Kubernetes-commit: f3fef01e79a75ebc4c327afb7d05d6fd350e08fa
2024-09-04 08:03:22 +02:00
Kubernetes Publisher
a887e579c0 Merge pull request #128323 from benluddy/cbor-client-gen
KEP-4222: Support CBOR for generated clients based on client-go feature gating.

Kubernetes-commit: 30ee35516b10120590bcc35ee8b4d8113493ddee
2024-10-29 17:46:14 +00:00
Ben Luddy
886262a3de Update vendor (client now calls ParseAccept from goautoneg).
Kubernetes-commit: 969357b99cd09d47d8a2d7073287f7316f3e6239
2024-10-28 11:22:59 -04:00
Ben Luddy
c957b59518 Wire client feature gates affecting RESTClient content config.
Kubernetes-commit: 67b9dc1f3e23529804345deea76d36d07dff59b1
2024-10-25 11:50:01 -04:00
Ben Luddy
9d19c65cdb Update generated clients.
Kubernetes-commit: 8fb9622b882496dad1e91103dd15fff7fc2658e0
2024-10-24 16:50:48 -04:00
Ben Luddy
d8fc5bb524 Make generated client codecs support CBOR based on feature gate.
Kubernetes-commit: 57e337dbbf9e437bcb350d6551689669bb79d579
2024-10-24 16:38:45 -04:00
Kubernetes Publisher
3dc7fd5f4c Merge pull request #128243 from benluddy/cbor-dynamic-integration
KEP-4222: Add CBOR variant of admission webhook integration test.

Kubernetes-commit: 5147eebf224ae41892b736179ca91c47fd794565
2024-10-25 01:56:21 +00:00
Kubernetes Publisher
abe0e99c21 Merge pull request #125314 from enj/enj/i/proto_for_core
Use protobuf for core clients

Kubernetes-commit: 7b7a7968d4c90c4430b1009546e13ce78bcde134
2024-10-24 17:56:17 +00:00
Ben Luddy
1cca19dc02 Add test-only client feature gates for CBOR.
As with the apiserver feature gate for CBOR as a serving and storage encoding, the client feature
gates for CBOR are being initially added through a test-only feature gate instance that is not wired
to environment variables or to command-line flags and is intended only to be enabled
programmatically from integration tests. The test-only instance will be removed as part of alpha
graduation and replaced by conventional client feature gating.

Kubernetes-commit: ea13190d8bd3a4bb3e82055b529aa7599ae5c6e1
2024-10-23 16:36:37 -04:00
Monis Khan
86e81b0a37 Generated
Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: 032e7f1556c74dbc25b5ed9368b2e86e26ba774f
2024-10-23 15:33:57 +00:00
Monis Khan
6f44458e5e Use protobuf for core clients
Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: c2ae465355b5222dbc27b8de8c55095b4f1b431a
2024-08-19 10:37:15 -04:00
Monis Khan
1647efd5c4 client-go/rest: move content type wiring from client to request
Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: fe1eda0649fdb6a15200d279be214c67246d3b12
2024-08-18 15:01:57 -04:00
Kubernetes Publisher
c5146a9031 Merge pull request #126697 from fedebongio/patch-1
Update OWNERS file in client-go/tools/leaderelection adding jefftree

Kubernetes-commit: 16dca1c330392f26f3421fd4cd7ee3d691b93213
2024-10-23 06:07:56 +00:00
Kubernetes Publisher
f05f3ca8bc Merge pull request #125516 from ComingCL/master
fix typo errors in client-go rest package

Kubernetes-commit: 367e7e889b993cedc5f775fba9782010f7219fc9
2024-10-23 01:56:27 +00:00
Federico Bongiovanni
65ed08a834 Update OWNERS
Adding  jefftree also to the reviewers list

Kubernetes-commit: 5f052ada19c43471bdcbb6da4e6f72405ca46bd7
2024-10-22 16:26:30 -07:00
Kubernetes Publisher
23900f4929 Merge pull request #128165 from liggitt/prune-self-require
Drop self-referencing replace directives

Kubernetes-commit: a8fc7ae761c19ab436cf513c9eed877f08961cf7
2024-10-18 04:29:40 +00:00
Kubernetes Publisher
6a276b2b95 Merge pull request #128003 from pohly/dra-classic-dra-removal
DRA: remove "classic DRA"

Kubernetes-commit: b1b4e5d397e303cf7a2a3fb02e90f40536da5896
2024-10-18 00:29:00 +00:00
Jordan Liggitt
607869c7d9 Drop self-referencing replace directives
Kubernetes-commit: 3be1109829d4b0921972bb8b5f66a4d179ff6255
2024-10-17 15:51:15 -04:00
Patrick Ohly
d366fa7737 DRA: remove "classic DRA"
This removes the DRAControlPlaneController feature gate, the fields controlled
by it (claim.spec.controller, claim.status.deallocationRequested,
claim.status.allocation.controller, class.spec.suitableNodes), the
PodSchedulingContext type, and all code related to the feature.

The feature gets removed because there is no path towards beta and GA and DRA
with "structured parameters" should be able to replace it.

Kubernetes-commit: f84eb5ecf894fa0fc4e0d05da52ef51d4cd723d9
2024-10-11 16:08:54 +02:00
Kubernetes Publisher
235936510e Merge pull request #128064 from dims/update-to-last-versions-of-some-very-infrequently-updated-repos
Update to last versions of some very infrequently updated repos

Kubernetes-commit: 07e73682b9a5259cacac978346ed4567588e4165
2024-10-16 06:00:06 +00:00
Kubernetes Publisher
43e9ea4bb5 Merge pull request #124059 from benluddy/dynamic-client-negotiation
Use content negotiation in the dynamic client.

Kubernetes-commit: c360a2c75c6e2a6a66bc5c6d37b30a4171b408da
2024-10-15 18:23:03 +01:00
Davanum Srinivas
e4db112974 Update to last versions of some very infrequently updated repos
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 7f8210e33f8cd626d1fb86cd7d12d077ec3047d5
2024-10-14 17:23:16 -04:00
Federico Bongiovanni
29ce700614 Update staging/src/k8s.io/client-go/tools/leaderelection/OWNERS
Co-authored-by: Benjamin Elder <bentheelder@google.com>

Kubernetes-commit: d20bc10645e716034e91d365d17d8b1011d3f1cd
2024-08-14 13:21:52 -07:00
Federico Bongiovanni
3c2f0814df Update OWNERS
Adding jefftree to the owners file for leaderelection

Kubernetes-commit: b5bbc1508f986df7811dd79e7b5116bbede784e8
2024-08-14 12:16:59 -07:00
Patrick Ohly
5d289bc44c client-go/tools/cache: add APIs with context parameter
The context is used for cancellation and to support contextual logging.

In most cases, alternative *WithContext APIs get added, except for
NewIntegerResourceVersionMutationCache where code searches indicate that the
API is not used downstream.

An API break around SharedInformer couldn't be avoided because the
alternative (keeping the interface unchanged and adding a second one with
the new method) would have been worse. controller-runtime needs to be updated
because it implements that interface in a test package. Downstream consumers of
controller-runtime will work unless they use those test package.

Converting Kubernetes to use the other new alternatives will follow. In the
meantime, usage of the new alternatives cannot be enforced via logcheck
yet (see https://github.com/kubernetes/kubernetes/issues/126379 for the
process).

Passing context through and checking it for cancellation is tricky for event
handlers. A better approach is to map the context cancellation to the normal
removal of an event handler via a helper goroutine. Thanks to the new
HandleErrorWithLogr and HandleCrashWithLogr, remembering the logger is
sufficient for handling problems at runtime.

Kubernetes-commit: 4638ba971661497b147906b8977ae206c9dd6e44
2024-07-26 15:26:00 +02:00
Patrick Ohly
b836a27b07 client-go/tools/cache: goroutine leak checking
Several tests leaked goroutines. All of those get fixed where possible
without API changes. Goleak is used to prevent regressions.

One new test specifically covers shutdown of an informer and its event
handlers.

Kubernetes-commit: 0ba43734b4c8998b4aaeb1fa2bec8dee609fa50a
2024-11-28 17:59:36 +01:00
ComingCL
de60f3ccb5 fix typo errors in client-go rest package
Kubernetes-commit: faf891ad2d6dd1706932c8cf8774b2c7fb2b4bb1
2024-06-15 00:28:03 +08:00
0xMALVEE
8410e24e31 testes written for cache/listers.go
Kubernetes-commit: 8e8770961616369ac47149c69e7dc29562578d51
2024-05-23 23:40:18 +06:00
Ben Luddy
ee51eaf9d0 Use content negotiation in the dynamic client.
Kubernetes-commit: 97958d96a2911c8b1df324868f4730b1c622c798
2024-02-15 17:47:19 -05:00
Kubernetes Publisher
c38ce11939 Merge pull request #127812 from p0lyn0mial/upstream-decode-list-blueprint
client-go/rest/request: decodes initialEventsListBlueprint for watchlist requests

Kubernetes-commit: a454563a8d5a93ae0288244eb63649e26e509991
2024-10-14 14:00:33 +00:00
Kubernetes Publisher
9cff3e43bd Merge pull request #128035 from alexanderstephan/export-reflector
Make getter names for reflector fields idiomatic

Kubernetes-commit: 4dc7a48ac6fb631a84e1974772bf7b8fd0bb9c59
2024-10-14 01:59:24 +00:00
Alexander Stephan
ce42c297f4 Make getter names for reflector fields idiomatic
Kubernetes-commit: fdabcb5141094cb99afde24ec1df15026b4ba349
2024-10-13 20:53:25 +00:00
Kubernetes Publisher
64f5574f09 Merge pull request #127998 from skitt/golang-x-oct-2024
October 2024 golang.org/x bump

Kubernetes-commit: 8cbb11519c54c120e2dc120a4799e53abbfea4a4
2024-10-11 14:00:21 +00:00
Kubernetes Publisher
2717ef67e3 Merge pull request #127985 from dims/update-moby-runc-dependencies-oct-10
Update moby/runc dependencies

Kubernetes-commit: 6e5e8f374e834fa8dab341bde5c522704ed55ba6
2024-10-11 14:00:19 +00:00
Stephen Kitt
9f84a0d8ed October 2024 golang.org/x bump
Nothing major here, but nothing liable to cause pain to downstreams
either.

* https://github.com/golang/crypto/compare/v0.26.0...v0.28.0 (there’s
  a SHA3 fix there but it’s only relevant for 32-bit platforms)
* https://github.com/golang/net/compare/v0.28.0...v0.30.0 (mostly
  http2; route address parsing fix on Darwin)
* https://github.com/golang/oauth2/compare/v0.21.0...v0.23.0 (Google
  license fix)
* https://github.com/golang/sys/compare/v0.23.0...v0.26.0 (faster
  getrandom() on Linux through the vDSO; improved RISC-V support)
* https://github.com/golang/term/compare/v0.23.0...v0.25.0
* https://github.com/golang/time/compare/v0.3.0...v0.7.0 (0-limit
  handling fix in x/time/rate; Google license fix)
* https://github.com/golang/tools/compare/v0.24.0...v0.26.0

This doesn’t include golang.org/x/exp; that doesn’t have any relevant
changes. There’s an apidiff fix but we always pull in the latest
apidiff anyway.

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

Kubernetes-commit: 6c5a528727c30803d4426b29c06ae5d350619877
2024-10-11 10:22:13 +02:00
Davanum Srinivas
6b8f524c7c Update moby/runc dependencies
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 521f2d106b9c5744ce57a8ec03124bcdadbca986
2024-10-10 11:58:22 -04:00
Kubernetes Publisher
d13452aae7 Merge pull request #127485 from seans3/websocket-upgrade-error-info
Upgrade websocket failure add extra error info

Kubernetes-commit: 5c96d8d34d44d5c03b206c9e48c8794730692dae
2024-10-11 02:00:19 +01:00
Lukasz Szaszkiewicz
d274c7ba36 client-go/rest/request: decodes initialEventsListBlueprint for watchlist requests
Kubernetes-commit: 7be192ae0bd5d9628c5ee37c2e8b843d602c0fa3
2024-10-02 15:03:39 +02:00
Sean Sullivan
3cd3050ffd Upgrade websocket failure add extra error info
Kubernetes-commit: eec2be81681c5ad147df13aad60a003af0c4c48f
2024-09-19 15:47:19 -07:00
Kubernetes Publisher
cd6681f3c4 Merge pull request #127942 from liggitt/json123
sigs.k8s.io/json go 1.23 bump

Kubernetes-commit: fc318e3ba4cb1db822d7f802993059846f64179d
2024-10-10 21:56:10 +00:00
Jordan Liggitt
bbcb9ac523 Update sigs.k8s.io/json to go1.23
Kubernetes-commit: 8eff759b6ac7c3bb0c6a8823c751f5a578d6f721
2024-10-10 11:00:11 -04:00
Kubernetes Publisher
cae730524e Merge pull request #127944 from antoninbas/use-generics-for-delaying-queue-waitFor
Use generics for waitFor (delaying workqueue) in client-go

Kubernetes-commit: f7fef0384ec1c666e6b68cae83a3b3c6d95aa7b0
2024-10-09 09:55:50 +00:00
Kubernetes Publisher
ba20fcad8f Merge pull request #127663 from alexanderstephan/export-reflector
Export name and typeDescription members of reflector struct

Kubernetes-commit: 95ec69c16c76b5ee71fdbebc7a5dea2c39341eb3
2024-10-09 01:56:00 +00:00