From 4692fbe0bb4ec18e7ffb464f6ba80f7899003a44 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 1 Jun 2026 20:53:48 +0200 Subject: [PATCH 1/3] apidiff: add CHANGELOG.md for client-go and apimachinery This is the manual part of these new files. The changes since 1.34 will be added in a separate commit, generated automatically. Kubernetes-commit: ffb5071875b9b9381cf9b7cedffc660bdc84d9f9 --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..d5a25f2db --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,12 @@ +This file documents Go API changes in client-go. + +Breaking API changes *must* be documented here, together with instructions on +how to deal with them or why they are expected to have no impact. + +Go API changes are typically not included in the Kubernetes release notes, so +non-breaking noteworthy Go API changes *may* be documented here if they are +useful to know about for developers. + +### Changes for Kubernetes <= 1.34 + +For older changes refer to the commit messages and PR descriptions. From 9b8f9973563bb8086bf53a020cbd95fa3a78e6dd Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 13 Apr 2026 18:39:59 +0200 Subject: [PATCH 2/3] apidiff: generate CHANGELOG.md for client-go and apimachinery since 1.34 The sections where automatically generated with: for commit in $(git log --merges --format="%H" v1.34.0..origin/master staging/src/k8s.io/client-go | tac); do hack/apidiff.sh -u -m -t $commit ./staging/src/k8s.io/client-go; done for commit in $(git log --merges --format="%H" v1.34.0..origin/master staging/src/k8s.io/apimachinery | tac); do hack/apidiff.sh -u -m -t $commit ./staging/src/k8s.io/apimachinery; done Master was v1.37.0-alpha.2-171-g8ee52dd0ca0. This may have to be redone depending on when we start enforcing populating these files: - Refresh and merge this branch. - Enforce changelog maintenance. - Backfill information about other PRs which got merged in the meantime. Kubernetes-commit: 019acf768b06286e067611eac60911af1409f408 --- CHANGELOG.md | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5a25f2db..58073d747 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,130 @@ Go API changes are typically not included in the Kubernetes release notes, so non-breaking noteworthy Go API changes *may* be documented here if they are useful to know about for developers. +### restmapper + discovery: add context-aware APIs + +See [PR #129109](https://github.com/kubernetes/kubernetes/pull/129109). + +``` +- ./kubernetes.(*Clientset).Discovery: changed from func() k8s.io/client-go/discovery.DiscoveryInterface to func() k8s.io/client-go/discovery.DiscoveryInterfaces +- ./kubernetes.Interface.Discovery: changed from func() k8s.io/client-go/discovery.DiscoveryInterface to func() k8s.io/client-go/discovery.DiscoveryInterfaces +- ./kubernetes/fake.(*Clientset).Discovery: changed from func() k8s.io/client-go/discovery.DiscoveryInterface to func() k8s.io/client-go/discovery.DiscoveryInterfaces +``` + +### Remove v2beta1 aggregated discovery support from clients + +See [PR #138271](https://github.com/kubernetes/kubernetes/pull/138271). + +``` +- ./discovery.AcceptV2Beta1: removed +- ./discovery.SplitGroupsAndResourcesV2Beta1: removed +``` + +### Add GC to client-go TLS cache + +See [PR #136355](https://github.com/kubernetes/kubernetes/pull/136355). + +``` +- ./transport.DialerStopCh: removed +``` + +### Add metric tracking the latest cached rv of informers + +See [PR #137419](https://github.com/kubernetes/kubernetes/pull/137419). + +``` +- ./tools/cache.FIFOMetricsProvider: removed +- ./tools/cache.InformerMetricsProvider.NewStoreResourceVersionMetric: added +- ./tools/cache.InformerOptions.FIFOMetricsProvider: removed +- ./tools/cache.NewIndexer: changed from func(KeyFunc, Indexers) Indexer to func(KeyFunc, Indexers, ...StoreOption) Indexer +- ./tools/cache.NewThreadSafeStore: changed from func(Indexers, Indices) ThreadSafeStore to func(Indexers, Indices, ...ThreadSafeStoreOption) ThreadSafeStore +- ./tools/cache.SetFIFOMetricsProvider: removed +- ./tools/cache.SharedIndexInformerOptions.FIFOMetricsProvider: removed +``` + +### Rename `name` to `command` in kuberc credentialPluginAllowlist entries + +See [PR #137272](https://github.com/kubernetes/kubernetes/pull/137272). + +``` +- ./tools/clientcmd/api.AllowlistEntry.Name: removed +``` + +### Add Resource Version query and Bookmarks to thread safe store + +See [PR #134827](https://github.com/kubernetes/kubernetes/pull/134827). + +``` +- ./tools/cache.Store.Bookmark: added +- ./tools/cache.Store.LastStoreSyncResourceVersion: added +- ./tools/cache.ThreadSafeStore.Bookmark: added +- ./tools/cache.ThreadSafeStore.DeleteWithObject: added +- ./tools/cache.ThreadSafeStore.LastStoreSyncResourceVersion: added +``` + +### apimachinery + client-go + device taint eviction unit test: context-aware Start/WaitFor, waiting through channels + +See [PR #135395](https://github.com/kubernetes/kubernetes/pull/135395). + +``` +- ./informers.SharedInformerFactory.StartWithContext: added +- ./informers.SharedInformerFactory.WaitForCacheSyncWithContext: added +- ./tools/cache.Controller.HasSyncedChecker: added +- ./tools/cache.Queue.HasSyncedChecker: added +- ./tools/cache.ResourceEventHandlerRegistration.HasSyncedChecker: added +- ./tools/cache.SharedInformer.HasSyncedChecker: added +- ./tools/cache/synctrack.AsyncTracker.UpstreamHasSynced: removed +- ./tools/cache/synctrack.SingleFileTracker.UpstreamHasSynced: removed +``` + +### Add identifier-based queue depth metrics for RealFIFO + +See [PR #135782](https://github.com/kubernetes/kubernetes/pull/135782). + +``` +- ./informers/internalinterfaces.SharedInformerFactory.InformerName: added +- ./informers/internalinterfaces.SharedInformerFactory.InformerName: added +``` + +### Ensure that processing does not block queue writers in RealFIFO + +See [PR #136264](https://github.com/kubernetes/kubernetes/pull/136264). + +``` +- ./tools/cache.Pop: removed +``` + +### Add atomic replace in client-go + +See [PR #135462](https://github.com/kubernetes/kubernetes/pull/135462). + +``` +- ./tools/cache.(*RealFIFO).PopBatch: changed from func(ProcessBatchFunc) error to func(ProcessBatchFunc, PopProcessFunc) error +- ./tools/cache.QueueWithBatch.PopBatch: changed from func(ProcessBatchFunc) error to func(ProcessBatchFunc, PopProcessFunc) error +``` + +### Embed proper interface in TransformingStore to ensure DeltaFIFO and RealFIFO are implementing it + +See [PR #135580](https://github.com/kubernetes/kubernetes/pull/135580). + +``` +- ./tools/cache.Store.Get, method set of TransformingStore: removed +- ./tools/cache.Store.GetByKey, method set of TransformingStore: removed +- ./tools/cache.Store.List, method set of TransformingStore: removed +- ./tools/cache.Store.ListKeys, method set of TransformingStore: removed +- ./tools/cache.TransformingStore: no longer implements ./tools/cache.KeyLister +- ./util/consistencydetector.CheckDataConsistency: changed from func(context.Context, string, string, ListFunc[T], k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions, RetrieveItemsFunc[U]) to func(context.Context, string, string, ListFunc[T], TransformFunc, k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions, RetrieveItemsFunc[U]) +``` + +### Replace deprecated sets.String with sets.Set in client-go/tools/* + +See [PR #133923](https://github.com/kubernetes/kubernetes/pull/133923). + +``` +- ./tools/cache.FakeExpirationPolicy.NeverExpire: changed from k8s.io/apimachinery/pkg/util/sets.String to k8s.io/apimachinery/pkg/util/sets.Set[string] +- ./tools/cache.Index: removed +``` + ### Changes for Kubernetes <= 1.34 For older changes refer to the commit messages and PR descriptions. From 04f8952eecc49705cfc88fd1eba9f45a51ea5642 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Tue, 2 Jun 2026 15:50:32 +0200 Subject: [PATCH 3/3] hack: optional Go API documentation Let's introduce this new functionality incrementally: at first the check will run, but won't fail "make verify". Once we have gained more confidence and experience with it, this commit can be reverted to make documentation mandatory again. Kubernetes-commit: 8af3e85e9ebab272af2db66449ee74d287c0e95a --- CHANGELOG.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58073d747..93878ddd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,8 @@ This file documents Go API changes in client-go. -Breaking API changes *must* be documented here, together with instructions on -how to deal with them or why they are expected to have no impact. - Go API changes are typically not included in the Kubernetes release notes, so -non-breaking noteworthy Go API changes *may* be documented here if they are -useful to know about for developers. +noteworthy Go API changes *may* be documented here. This is currently not +*required*, so consult the git history to see all changes. ### restmapper + discovery: add context-aware APIs