talos/pkg/kubernetes
Andrey Smirnov 149592fa59
fix: watch kubelet's kubeconfig and time out for cache sync
Fixes #13169

Also fixes a number of other issues with controller being stuck
"watching" over stale data.

The major part of the change is to watch contents of kubelet's
kubeconfig and restart the watch when it changes.

The internals of the watch process don't always bubble up error
properly, or we don't watch for errors.

With this change, not only initial sync has a timeout and a way to abort
the sync process, Talos now can also restart the sync on kubeconfig
change make it more transparent.

This might become irrelevant if we start managing kubeconfig via Talos
controlplane for workers, but for now this seems to be the way to fix
issues.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-04-22 17:44:46 +04:00
..
2025-11-04 15:21:57 +04:00