13441 Commits
Author SHA1 Message Date
kubernetes-prow[bot] e405cba3cd Merge pull request #143823 from SEPURI-SAI-KRISHNA/fix-kubeadm-windows-socket-probe-leak
kubeadm: close the probe connection in isExistingSocket on Windows
2026-11-05 23:15:22 +00:00
kubernetes-prow[bot] a6f04b605a Merge pull request #143587 from antcybersec/remove-gate-nodeswap
pkg/features: remove GA feature gate NodeSwap
2026-11-05 18:01:25 +00:00
SEPURI-SAI-KRISHNA 6b49701ed8 kubeadm: close the probe connection in isExistingSocket on Windows
isExistingSocket dials a socket to decide whether it exists. The Windows
implementation assigned the connection from winio.DialPipe to _ and
never closed it, and go-winio sets no finalizer on the handle, so every
socket that answered the probe left a named pipe instance open until
kubeadm exited. DetectCRISocket probes each of the known CRI sockets in
turn, so one instance leaked per socket that answered.

Defer Close on the connection, after the error check since DialPipe
returns a nil connection together with its error. The unix
implementation already closes its connection once the dial succeeds.
2026-11-05 22:17:25 +05:30
kubernetes-prow[bot] 1f793e1740 Merge pull request #143604 from asvw/upgrade-diff-dry-run-etcd
kubeadm: include the etcd manifest in 'upgrade diff' and the dry run
2026-11-05 14:55:38 +00:00
kubernetes-prow[bot] d47ec68cea Merge pull request #143729 from yongruilin/managedfields-opt-out-scheduler
KEP-5958: Drop managedFields in kube-scheduler informers
2026-11-04 12:44:46 +00:00
Yongrui Lin 9b467c8660 kube-scheduler: drop managedFields in informers
With ManagedFieldsOptOutClient enabled, the informers use their own
client with DropManagedFields set, replacing the pod informer's trim.
Plugins' handle.ClientSet() is unchanged.
2026-11-03 20:34:01 +00:00
Andrei Svetski 845485c9be kubeadm: include the etcd manifest in 'upgrade diff' and the dry run
Add the missing etcd manifest to 'kubeadm upgrade diff' and to the dry
run of 'kubeadm upgrade apply' and 'kubeadm upgrade node' when
etcd.local is set.

These currently show the kube-apiserver, kube-controller-manager and
kube-scheduler manifests, but not the etcd manifest. An upgrade
also rewrites this manifest when etcd is managed by kubeadm.

The diff builds it as the upgrade does and compares it with the manifest
on disk. The dry run writes it before the other components unless the
etcd upgrade is disabled.
2026-11-03 18:45:58 +01:00
kubernetes-prow[bot] 96dd990afa Merge pull request #143722 from deads2k/handle-crash-cleanup
protecting a couple go funcs with handle crash
2026-11-03 10:27:11 +00:00
kubernetes-prow[bot] 08aa427428 Merge pull request #143340 from zl86790/fix-143275-kube-proxy-topology-race
kube-proxy: avoid missing the initial node topology update
2026-11-02 22:52:01 +00:00
David Eads 4fce9a9d84 protecting a couple go funcs with handle crash 2026-11-02 16:22:01 -05:00
kubernetes-prow[bot] de06dce3c0 Merge pull request #143628 from devreddy1015/kubeadm-upgrade-plan-no-apiserver-pods
kubeadm: i observe before, `upgrade plan` crashed. Now it shows an error.
2026-11-02 17:56:21 +00:00
kubernetes-prow[bot] 77bf04939e Merge pull request #143514 from pohly/logcheck-client-go-proxy
proxy: use contextual logging APIs
2026-11-02 17:56:11 +00:00
Dan Winship 4c6d8a38b9 Drop pkg/util/iptables, port to sigs.k8s.io/iptables-wrappers/pkg/iptables (#143065)
* Drop pkg/util/iptables, port to sigs.k8s.io/iptables-wrappers/pkg/iptables

* vendor iptables-wrappers

* update imports

* drop pkg/util/iptables

* update for constructor changes

* update for Restore changes

* update for Monitor changes

* add context args to remaining utiliptables methods

* update for GetChainsFromTable changes
2026-11-02 17:55:51 +00:00
devreddy1015 b8190b05f1 kubeadm: i observe before, upgrade plan crashed. Now it shows an error. 2026-11-02 19:06:19 +05:30
kubernetes-prow[bot] 2454031cec Merge pull request #143629 from devreddy1015/kubeadm-minimum-version-error
kubeadm: error showed the wrong version. Now it shows the minimum supported version.
2026-11-02 10:21:34 +00:00
Patrick Ohly 752c44fbf8 proxy: use contextual logging APIs
Pass loggers and contexts to client-go instead of relying on the global
logger, and replace calls to APIs without context support.
2026-11-02 08:28:35 +01:00
zl86790andAntonio Ojea a501ef761f Update cmd/kube-proxy/app/server.go
Co-authored-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
2026-11-02 01:32:23 +08:00
kubernetes-prow[bot] dca319f2ef Merge pull request #143571 from pohly/client-go-informers-context
metadatainformer and dynamic informer factory: add missing StartWithContext and WaitForCacheSyncWithContext
2026-10-30 17:47:54 +00:00
devreddy1015 d3d85f9b2e kubeadm: error showed the wrong version. Now it shows the minimum supported version. 2026-10-30 20:40:20 +05:30
Wojciech Tyczyński 367685bf2d Update expected Reserve plugins for DefaultPreemption 2026-10-30 12:11:16 +00:00
kubernetes-prow[bot] add15ceb9d Merge pull request #143557 from devreddy1015/kubeadm-missing-ca-hint
kubeadm: the missing CA hint shows again
2026-10-30 10:33:55 +00:00
devreddy1015 a898956c09 kubeadm: the missing CA hint shows again 2026-10-30 14:32:13 +05:30
Anant Kumar aa185281af pkg/features: remove GA feature gate NodeSwap
The gate graduated to GA and was locked to its default in 1.34, so 1.38 is
the first release in which the compatibility window allows removing it.

With the gate always on, the kubelet checks collapse: swap behaviour is
validated unconditionally, the node status reports swap capacity whenever
cadvisor reports it, and LimitedSwap depends only on the swap controller
being available. The kubelet configuration error for setting memorySwap
while the gate was disabled is unreachable, since a locked gate cannot be
turned off, and goes with it.

The e2e feature label of the same name is a test selector rather than a
reference to the gate, so it stays.
2026-10-30 11:28:55 +05:30
Patrick Ohly 5b1d3ee25e metadatainformer and dynamic informer factory: add missing StartWithContext and WaitForCacheSyncWithContext
These methods already exist in informers.SharedInformerFactory. Because the
factories here key informers by group/version/resource,
WaitForCacheSyncWithContext returns the new cache.GVRSyncResult instead of
cache.SyncResult.

Start and WaitForCacheSync are now marked with //logcheck:context. Consumers
which use the logcheck linter must switch to the *WithContext variants.
Mock implementations of these interfaces need to be extended.
2026-10-29 18:38:06 +01:00
kubernetes-prow[bot] 4a7fc3e0fc Merge pull request #143513 from pohly/logcheck-client-go-controllers
controllers: use contextual logging APIs
2026-10-29 14:35:31 +00:00
kubernetes-prow[bot] 289ca7eb1c Merge pull request #143512 from pohly/logcheck-client-go-scheduler
scheduler: use contextual logging APIs
2026-10-29 14:35:21 +00:00
kubernetes-prow[bot] 9151c220ed Merge pull request #143468 from yashsingh74/bump-coredns-1.15.0
bump coredns to v1.15.0
2026-10-29 13:01:01 +00:00
Patrick Ohly b09fdd9b62 scheduler: use contextual logging APIs
Pass loggers and contexts to client-go instead of relying on the global
logger, and replace calls to APIs without context support.
2026-10-29 13:49:11 +01:00
kubernetes-prow[bot] 8840cef218 Merge pull request #143283 from michaelasp/controller-client-builder
controller-manager: deprecate Config and ConfigOrDie from ControllerClientBuilder
2026-10-29 07:18:44 +00:00
Michael Aspinwall 9f7be5e876 controller-manager: deprecate ControllerClientBuilder.Config and ConfigOrDie
A raw rest.Config lets a controller build a client that bypasses the
client configuration and transport wrappers the controller manager
applies to the clients it builds, such as the leader election write gate
of KEP-6361. Deprecate Config and ConfigOrDie on ControllerClientBuilder
and on the cloud-provider copy of the interface; out-of-tree cloud
providers and controller managers that call them keep working, and the
configs they get still carry the controller manager's wrappers.

Add TypedClientBuilder, implemented by both in-tree builders, with the
clients controllers were building from raw configs: metadata, dynamic
and scale clients, WithRateLimits for controllers that need more QPS and
burst than the defaults, and WithDropManagedFields for the informer
clients. The controller managers hand the builder to their controllers,
and a forbidigo rule keeps in-tree code off the deprecated methods. Unit
tests cover the derived builders on both implementations.

DiscoveryClient's discovery-tuned limits become a floor rather than an
override, so a builder configured with higher limits keeps them; the
storage version migrator relies on that for its discovery client.

The HPA metrics and apiextensions clients still need a config and are
built in one lint-exempted place in the controller context, since
k8s.io/controller-manager does not depend on those client packages.

DynamicControllerClientBuilder cached the composed WrapTransport, so the
base config's wrapper was applied twice to every client after the first
one built under a service account name. Cache only the token wrapper.
2026-10-28 14:29:22 -07:00
kubernetes-prow[bot] 42e2a1c97a Merge pull request #140280 from yashsingh74/coredns-dependency-fix
kubeadm: propagate resolved CoreDNS version override to migration, preflight, and upgrade plan
2026-10-28 20:42:09 +00:00
Patrick Ohly a2095779c0 controllers: use contextual logging APIs
Pass loggers and contexts to client-go instead of relying on the global
logger, and replace calls to APIs without context support.
2026-10-28 13:47:11 +01:00
kubernetes-prow[bot] 8fae0b8f7e Merge pull request #143362 from my-git9/ut/checks
kubeadm: increase ut coverage for preflight/check
2026-10-28 11:31:43 +00:00
Antoni Zawodny cdde6a1e25 Update CPG API consumers in code to use the beta API 2026-10-28 08:27:44 +01:00
xin.li 2bd9c3d4bd update the ut for the second pass review
Signed-off-by: xin.li <xin.li@daocloud.io>
2026-10-28 10:11:55 +08:00
yashsingh74 48946ff1bb kubeadm: resolve CoreDNS version per Kubernetes release instead of a flat constant
CoreDNS was pinned to a single hardcoded version constant regardless of the
target Kubernetes version, unlike etcd which already resolves its version
from a per-Kubernetes-minor support map. Users could override the deployed
tag via ClusterConfiguration.dns.imageTag, but several code paths (Corefile
migration, upgrade preflight checks, and `kubeadm upgrade plan` output)
still referenced the raw constant directly, so the override didn't fully
propagate.

Mirror the existing etcd pattern: add SupportedCoreDNSVersion (a
per-Kubernetes-minor map) and CoreDNSSupportedVersion() as a resolver,
sharing the lookup logic with EtcdSupportedVersion(). GetDNSImage/
GetDNSImageTag resolve the default through this map and then apply the
user's dns.imageTag override on top, matching GetEtcdImage/GetEtcdImageTag.
Thread the resolved/overridden version through the Corefile migration
logic, the upgrade preflight CoreDNS checks, and the suggested DNSVersion
in `kubeadm upgrade plan`, so the override is honored everywhere instead of
only in the deployed manifest.
2026-10-28 07:30:55 +05:30
Yongrui Lin 9c1235e9d5 Use k8s.io/apiextensions-api for CRD types and clients
Code that needs the conversions to the internal version still imports
them from k8s.io/apiextensions-apiserver.
2026-10-27 23:16:06 +00:00
yashsingh74 7cc4d44b03 bump coredns to v1.15.0
Signed-off-by: yashsingh74 <yashsingh1774@gmail.com>
2026-10-27 21:40:58 +05:30
kubernetes-prow[bot] 78fe20a84c Merge pull request #137396 from atiratree/imperative-eviction-interceptor
Add imperative eviction responder for EvictionRequest API
2026-10-27 14:35:16 +00:00
xin.li e740f52e72 update the ut for the first review
Signed-off-by: xin.li <xin.li@daocloud.io>
2026-10-27 16:23:20 +08:00
kubernetes-prow[bot] b5ef31dc5c Merge pull request #143087 from SEPURI-SAI-KRISHNA/fix-kubeadm-etcd-rollback
kubeadm: fix etcd data rollback and retry the etcd backup
2026-10-26 15:42:11 +00:00
SEPURI-SAI-KRISHNA 8606006f18 kubeadm: fix etcd data rollback and retry the etcd backup
The etcd data dir is backed up with "cp -r <dataDir> <backupDir>" into
an existing backup dir, so the data lives in <backupDir>/<basename>.
Rolling back with "cp -r <backupDir> <dataDir>" copied the backup dir
inside the data dir and left the live data untouched.

Replace the cp and xcopy variants of CopyDir with one portable Go
implementation that copies the contents of src and keeps the source
file modes. Remove the member dir before restoring so files written
since the backup do not survive, and refuse to clear it at all unless
the backup has a member dir to restore from.

The backup copies the data dir of a running etcd, so it can fail when
etcd renames a WAL file during the copy. Retry it for up to 30 seconds,
starting from an empty backup dir each time.
2026-10-26 16:31:27 +05:30
SEPURI-SAI-KRISHNA 6419e1e0ad kubeadm: retry etcd member listing on transient errors
listMembers polls MemberList until the EtcdAPICall timeout, but its
condition returned the error, which stops the poll immediately. One
transient error failed GetMemberID and ListMembers, breaking control
plane join right after adding a learner, and etcd member removal on
reset. Return false, nil like the other etcd retry loops.

Now that the poll runs to the deadline, say that the retry timeout was
exhausted and keep the last etcd error as the cause.
2026-10-26 16:26:30 +05:30
xin.li 93cee00bea kubeadm: increase ut coverage for preflight/check
Signed-off-by: xin.li <xin.li@daocloud.io>
2026-10-24 16:21:13 +08:00
Sascha Grunert 2c373ec34d kubeadm: Don't prompt in the Windows CopyDir
xcopy prompts whether a non-existent destination is a file or a directory and
whether to overwrite existing files, and both prompts fail without an
interactive stdin. The first breaks TestCopyDir/success on Windows (exit status
2), the second would break the etcd data rollback, which copies over an existing
data dir. Pass /I and /Y so xcopy doesn't prompt.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2026-10-23 09:14:41 +02:00
lizhe 62a2dc6ba2 kube-proxy: avoid missing initial topology update 2026-10-23 14:12:40 +08:00
Jordan Liggitt fbc5386508 Cleanup inactive approvers 2026-10-22 13:34:00 -04:00
Filip Křepinský e00acabe5b add imperative-eviction-responder-controller controller 2026-10-22 14:56:43 +02:00
kubernetes-prow[bot] 8bc4bbffb0 Merge pull request #137133 from johankj/kep-4563/eviction-request-controller
EvictionRequest controller
2026-10-22 09:13:46 +00:00
kubernetes-prow[bot] 5e652fb423 Merge pull request #141939 from maxcelant/mcelant/refactor-walkall
Clean up workflow runner to use native for loop
2026-10-21 23:51:29 +00:00