5387 Commits

Author SHA1 Message Date
Mads Jensen
d91024383a Lint: Activate modernize/forvar rule in golangci-lint.
Kubernetes-commit: dd32d7c324b97d259b99c1464802d9e3ca706a94
2026-03-05 00:11:40 +01:00
Michael Aspinwall
aae801378e Add metric tracking the latest cached rv of informers
Kubernetes-commit: 9fb9e933b2ebae2d94edd29b7dec2c1df9e625a6
2026-03-04 22:13:54 +00:00
Aaron Prindle
3e4de9e6b4 refactor: update in-tree FieldsV1 consumers to use format-specific accessors
Kubernetes-commit: e57b3a74f37754c9455a3debafd25c88d434e69d
2026-03-04 21:44:21 +00:00
Jefftree
e45d8623ff update kube-openapi
Kubernetes-commit: 721eea74e75dc95bafbfa450bb2309e494abf45c
2026-03-04 15:33:47 -05:00
Rajneesh180
187c42c884 client-go: guard ResultChan() close in StartEventWatcher
When watch.Broadcaster.Shutdown() is called it drains all queued events
then calls closeAll(), which closes every watcher's result channel.
eventBroadcasterImpl.Shutdown() calls Broadcaster.Shutdown() first,
then calls the cancellation context's cancel() function.  Between those
two steps there is a window in which the result channel is closed while
the cancellation context is still live.

Without the two-value channel receive the goroutine in StartEventWatcher
would spin on the already-closed channel: each select iteration
immediately receives the zero-value watch.Event, the type assertion
fails (nil interface, ok == false), and the loop continues burning CPU
until the select scheduler eventually picks the cancelationCtx.Done()
case.

Guard against this by reading the ok boolean from the channel receive:

  case watchEvent, ok := <-watcher.ResultChan():
    if !ok {
      return
    }

This is the correct and idiomatic Go pattern for a channel that may be
closed by its producer.  Note that when this return path is taken the
broadcaster has already delivered every queued event (Broadcaster.Shutdown
blocks until the distribute loop exits before closeAll runs), so no
events are silently dropped.

Add a regression test (TestStartEventWatcherExitsOnDirectShutdown) that
creates a broadcaster without an external context so Shutdown() is
fully synchronous, starts a watcher, and verifies the goroutine exits
cleanly via goleak.VerifyNone.

Signed-off-by: Rajneesh180 <rajneeshrehsaan48@gmail.com>

Kubernetes-commit: 95c15b54069922b0a66c198a064577ea0a160694
2026-03-04 16:05:26 +05:30
Kubernetes Publisher
2dd466fcfe Merge pull request #137291 from everettraven/upstream/dv/maxLength-fixup
[Declarative Validation] Bring `k8s:maxLength` tag in line with OpenAPI `maxLength` validation semantics

Kubernetes-commit: e08e598df07bc929679ef046418992a8205da18f
2026-03-04 00:25:37 +00:00
Kubernetes Publisher
486be0fbf9 Merge pull request #135196 from harche/i133202
KEP-4680: Add message field support to DRA device health reporting

Kubernetes-commit: be6162afb876e60ded92780786519c976fc0be08
2026-03-03 20:25:21 +00:00
Kubernetes Publisher
e243a98fa8 Merge pull request #137167 from pohly/dra-device-taints-update-timestamp
DRA device taints: automatically bump TimeAdded when changing effect

Kubernetes-commit: 13010f06b270df96c4f558bdadcad93970000a53
2026-03-03 20:25:19 +00:00
xigang
f6c2d7ca65 client-go/cache: add slow-handler tracing in processorListener
Signed-off-by: xigang <wangxigang2014@gmail.com>

Kubernetes-commit: ac1eb12281bdc7fb7e0269fb4bb914369b92bb64
2026-03-03 13:07:08 +08:00
Kubernetes Publisher
55e741a004 Merge pull request #137296 from michaelasp/fixListenerDeadlock
Fix listener deadlock in shared informer

Kubernetes-commit: 1879769b9354b6e47a13dac831aec6fe3e0368b6
2026-03-03 00:24:45 +00:00
Hemant Kumar
27966b2574 Update generated code
Kubernetes-commit: 143c56ddeb8ba470102d5145bbfafca898999763
2026-03-02 17:00:43 -05:00
tinatingyu
8776b282cc client-go CA rotation
Kubernetes-commit: b806a3207beb1afabc3d3d93fbadba38ffb8a110
2026-03-02 20:40:00 +00:00
Davanum Srinivas
9926c67348 staging: extract CRI streaming modules with client-go compatibility
Extract streaming code into dedicated staging modules while keeping stable
compatibility APIs for external client-go consumers.

This commit:
- adds `k8s.io/cri-streaming` for CRI exec/attach/portforward server code
- adds `k8s.io/streaming` as the canonical home for shared transport
  primitives (`httpstream`, `spdy`, `wsstream`, runtime helpers)
- switches in-tree transport consumers to `k8s.io/streaming`
- removes in-tree kubelet CRI streaming package
- preserves NO_PROXY/no_proxy CIDR handling in extracted SPDY proxier logic
- adds deprecated `k8s.io/apimachinery/pkg/util/httpstream` compatibility
  wrappers (`httpstream`, `spdy`, `wsstream`) backed by `k8s.io/streaming`
- restores exported client-go SPDY/portforward API signatures to
  apimachinery `httpstream` types for downstream compatibility
- adds streaming-native client-go adapters/constructors so in-tree callers
  can use `k8s.io/streaming` without changing external compatibility APIs
- deduplicates SPDY-over-websocket dial negotiation shared by compat and
  streaming tunneling dialers
- logs dropped unknown stream types in `RemoveStreams` adapter fallbacks to
  improve compatibility-path debuggability
- adds integration coverage for the streaming-upgrader-to-client-go-compat
  adapter path against a real cri-streaming exec endpoint
- clarifies kubectl streaming import aliasing to avoid `httpstream` package
  ambiguity
- updates tests, import restrictions, publishing metadata, and vendor/module
  metadata for the new staging modules

Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 1ee1ff97fb7f9755a44d29bee0c80d2ccbed68dc
2026-02-28 19:40:07 -05:00
Eddie
c86837f7ed Promote sig-storage feature MutableCSINodeAllocatableCount to GA (#136230)
* Promote MutableCSINodeAllocatableCount to GA

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Lock MutableCSINodeAllocatableCount feature gate to default

Signed-off-by: Eddie Torres <torredil@amazon.com>

---------

Signed-off-by: Eddie Torres <torredil@amazon.com>

Kubernetes-commit: 41bb4b6a8b4e0f15ab7ffcc6369c68bc599fb957
2026-02-28 08:42:18 +00:00
Kubernetes Publisher
2f21ae3478 Merge pull request #137272 from pmengelbert/pmengelbert/kuberc_name_to_command/1
Rename `name` to `command` in kuberc credentialPluginAllowlist entries

Kubernetes-commit: cf876463cdf5571d2051096859779d9d210074b3
2026-02-27 20:42:02 +00:00
Bryce Palmer
b59431fbc5 update-codegen: regenerate generated files
Signed-off-by: Bryce Palmer <bpalmer@redhat.com>

Kubernetes-commit: 729792e8700780f9cfbb4a14e74621ef219444c1
2026-02-27 15:23:12 -05:00
Michael Aspinwall
54ee8fecae Fix deadlock when listeners get added before processing starts
Kubernetes-commit: 0ce498ff21296f44dfa980d8679c0b7697e2d6b8
2026-02-27 18:55:39 +00:00
Kubernetes Publisher
f037d681ac Merge pull request #137286 from humblec/update-vendored-dependencies
Update vendored dependencies ( gomega/cadvisor)

Kubernetes-commit: 3f2ebc50eecfaeda23df4435dc82422fa65425ed
2026-02-27 16:41:07 +00:00
Humble Devassy Chirammal
99791c7452 dependencies: bump gomega to v1.39.1 and ginkgo to v2.28.1
Kubernetes-commit: 600d188f2b02eea974509062c04186309065ff16
2026-02-27 15:48:21 +05:30
Kubernetes Publisher
1f07d6645b Merge pull request #137189 from dhruv7539/codex/getlogs-reactor-support
client-go: make fake Pods.GetLogs honor reactors

Kubernetes-commit: 44b486f43c9792e812f849d9509449ac69edf55c
2026-02-27 03:58:18 +00:00
Kubernetes Publisher
efbad1b7ed Merge pull request #135775 from bitoku/no-noexec
Update OCI image volume type description to remove "noexec" attribute

Kubernetes-commit: 7d70fe491d50ebbc14a0495ee09fa0e922a2ff82
2026-02-27 03:58:16 +00:00
Hemant Kumar
73f4fa85e7 Update generated fields
Kubernetes-commit: 7d9e61be7ef21576e42ed533a233d7e985358b84
2026-02-26 15:49:52 -05:00
Kubernetes Publisher
f66040b9dc Merge pull request #137261 from tchap/kcm-le-check-context-canceled
client-go/leaderelection: Short-circuit on context canceled

Kubernetes-commit: 0a68f9849435bc5015e4e0ae5b4b661bb927b6db
2026-02-26 19:36:48 +00:00
Peter Engelbert
b840391f92 Rename AllowlistEntry clientcmd.Name to Command
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>

Kubernetes-commit: 505b937babc9ab0061ed346ec0278a3a605664ac
2026-02-26 13:27:46 -05:00
dhruv7539
1349319d7c client-go: error on invalid fake pod logs reactor object
Kubernetes-commit: 3ed316397734e59e9a39c662f70de1b86192db17
2026-02-26 09:58:23 -08:00
Ondra Kupka
8a32b4087c client-go/leaderelection: Check context canceled
The change introduced in 59cd1d0b3bb378f40a639e21b615f4df1d4a5a14
causes PollUntilContextTimeout to call the condition function even when
the context is canceled already. This is unnecessary in our case and
only leads to one extra loop of processing and extra error messages.
This change makes the renew loop behave like it did before the change.

Kubernetes-commit: aa494f8174d745c3d9842f3d48272a3c2d6dcbcc
2026-02-26 12:04:01 +01:00
Kubernetes Publisher
764b57d771 Merge pull request #129339 from pohly/log-client-go-features
client-go features: ignore contextual logging

Kubernetes-commit: 31d35e649098be997d31a6bbf9f6a982c486b0ab
2026-02-25 11:35:15 +00:00
dhruv7539
f1d9ba91c7 client-go: keep fake pod log action compatible
Kubernetes-commit: 60c697419d2695108a054d704334778e3d945a6c
2026-02-23 10:35:50 -08:00
Kubernetes Publisher
62f2159da2 Merge pull request #136937 from p0lyn0mial/upstream-reflector-list-unsupported-table
client-go/reflector: reject Table format resources in List and Watch paths

Kubernetes-commit: 3bc0b290e9c1cd81db1ed5119b242b5dfce931af
2026-02-23 18:10:18 +00:00
Kubernetes Publisher
00e45797cb Merge pull request #136923 from jpbetz/mock-limitations-docs
Explain limitations and maintenance policy of fake client

Kubernetes-commit: 21d8cca01dbec9e5e584d5684b2b3a8e8cd9364c
2026-02-23 10:10:45 +00:00
dhruv7539
e8eab37058 client-go: make fake Pods.GetLogs honor reactors
Kubernetes-commit: 3d41b434c0e88e9f74e38fe654d7b5bfd77090d0
2026-02-22 14:47:29 -08:00
Kubernetes Publisher
efc4692504 Merge pull request #135313 from oduludo/enable-commentstart-apiserverinternal
commentstart lint fixes for apiserverinternal API group

Kubernetes-commit: 8bfda5d315977489bd8a2fb1cfceaebd1ee7db8d
2026-02-21 22:09:34 +00:00
Ludo van Orden
648a945fad updated generated code
Kubernetes-commit: 156fc7981c8b8b0f4253420f47e3ad561e389ab9
2026-02-20 23:59:35 +01:00
Kubernetes Publisher
6b803d4e11 Merge pull request #136392 from skitt/unsupported-typo
Align IsWatchListSemanticsUnSupported comment

Kubernetes-commit: 15a2107890558876c35db3e44420575d657ac3a0
2026-02-20 18:10:21 +00:00
Patrick Ohly
f6cd0c0583 DRA device taints: generated files
Kubernetes-commit: 7d2781a0c3c02e2ad47714698f86175cd8b6ec72
2026-02-20 13:19:38 +01:00
Patrick Ohly
67f0d98034 DRA device taints: automatically bump TimeAdded when changing effect
In practice, TimeAdded is managed by the API server. When admins used
DeviceTaintRule to simulate eviction, then change the effect to really evict,
it is useful to calculate tolerations based on the time when that second
update happened. Therefore the TimeAdded field gets bumped automatically
when changing the effect.

Kubernetes-commit: f28dc4139208e64fe2882cd44d548c25020f2e3a
2026-02-20 12:35:40 +01:00
Kubernetes Publisher
100af76fc5 Merge pull request #137101 from richabanker/informer-metric-latency
Add processing latency metric for RealFIFO

Kubernetes-commit: 7336e04752a3ce946697c3524ed40104d6086b73
2026-02-20 02:13:22 +00:00
Jordan Liggitt
97646e5606 Fix vet error
Kubernetes-commit: 45900a1debee388738f299c0a001ed01e8b25208
2026-02-17 16:42:55 -05:00
Jordan Liggitt
103162f118 Bump to go 1.26
Kubernetes-commit: f291ae40b03afaaf49cca43b650bfbd05f4babee
2026-02-17 16:05:07 -05:00
Copilot
78fb6ed2e1 client-go/cache: Remove reflector context cancellation logging
The error returned from Until() is solely from context cancellation
which is expected behavior when the reflector is stopped. Logging
this as an error (or even at V(4)) creates unnecessary noise.

Kubernetes-commit: cc483208aa306b8c4078d4118cf78a10e58481ec
2026-02-16 22:04:52 -05:00
Richa Banker
59f55827e6 Add processing latency metric for RealFIFO
Kubernetes-commit: d049bd123391f4c1a86e493888560d8549a52dc2
2026-02-16 15:15:47 -08:00
Kubernetes Publisher
70ab833f66 Merge pull request #136039 from lalitc375/map-graduation
Promote MutatingAdmissionPolicy to v1 (GA)

Kubernetes-commit: b08fa0cdf18610be74d9741cf361446a5f42ff76
2026-02-18 22:09:27 +00:00
Rodrigo Campos
1d4002e88b Remove references to UserNamespacesSupport feature gate from core types
It's GA now. To regenerate the files I did:
        make WHAT=cmd/kube-apiserver
        make update

While we are there, remove the reference that the field is alpha.

Signed-off-by: Rodrigo Campos <rodrigo@amutable.com>

Kubernetes-commit: 8db51091e82490bccc0018763ba7e05ffb8ab458
2026-02-12 11:14:43 +01:00
Rodrigo Campos
a63d33951d staging/testdata: Remove UserNamespacesSupport reference
This is just a sed to remove the old data from the text fixtures too.

While two files are clearly test data given that they include testdata
in their name, these two is not so obvious but are also test data:

	* openapi/swagger-with-shared-parameters.json: is referenced in "staging/src/k8s.io/cli-runtime/pkg/resource/query_param_verifier_test.go",
          in particular in this part: ´filepath.Join("..", "..", "artifacts", "openapi", "swagger-with-shared-parameters.json")´

	* batch.k8s.io_v1.json: is in
	  `staging/src/k8s.io/kubectl/pkg/explain/v2/templates/plaintext_test.go`,
          in a "//go:embed batch.k8s.io_v1.json".

Signed-off-by: Rodrigo Campos <rodrigo@amutable.com>

Kubernetes-commit: 8d0f80e4ed87658c0e05b9db0690927547be6ad5
2026-02-13 16:04:51 +01:00
Joe Betz
8304d788bb Explain limitations and maintenance policy of fake client
Kubernetes-commit: bce392d1a7dbbe1112d8113ec6539826bfdfcdca
2026-02-10 16:49:53 -05:00
Lukasz Szaszkiewicz
7b594c4c71 reflector: reject Table format resources in List and Watch paths
Kubernetes-commit: a46b1903a5426ede16d021b49c96d3f4ba7aea4d
2026-02-10 21:42:42 +01:00
Jefftree
d6503fcc3e Update leasecandidate client to read from cache
Kubernetes-commit: 5a306036a53754ce26938cedd89b2ddf3b105aa2
2026-01-22 16:55:50 +00:00
Stephen Kitt
80c1d965be Run codegen
Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: af5317bb8842ba758b92bd169056eb9a666198b8
2026-01-21 14:06:32 +01:00
Monis Khan
f5fc1e5f67 Add GC to client-go TLS cache
Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: fa9a1fe5f7084c0a1371d87e880c1a9e58f935a4
2026-01-16 14:58:52 -05:00
yliao
e924e3f2c5 codegen
Kubernetes-commit: 58da2e682f1ecba5d848da4810c49ad6baf886a1
2026-01-14 21:34:37 +00:00