Andrey Smirnov 9f04f2c4ef
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>
(cherry picked from commit 149592fa59d20c5aa29e4c0af9a3760585f378ce)
2026-04-24 21:45:14 +04:00
..
2024-11-22 09:16:13 +01:00
2024-08-26 15:23:21 +04:00
2024-08-26 15:23:21 +04:00
2024-08-26 15:23:21 +04:00