k3s/pkg/cluster
Brad Davidson c44d33d29b Fix race condition in tunnel server startup
Several places in the code used a 5-second retry loop to wait on
Runtime.Core to be set. This caused a race condition where OnChange
handlers could be added after the Wrangler shared informers were already
started. When this happened, the handlers were never called because the
shared informers they relied upon were not started.

Fix that by requiring anything that waits on Runtime.Core to run from a
cluster controller startup hook that is guaranteed to be called before
the shared informers are started, instead of just firing it off in a
goroutine that retries until it is set.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-04-28 11:24:34 -07:00
..
managed [master] changing package to k3s-io (#4846) 2022-03-02 15:47:27 -08:00
bootstrap_test.go [master] changing package to k3s-io (#4846) 2022-03-02 15:47:27 -08:00
bootstrap.go Lock bootstrap data with empty key to prevent conflicts 2023-04-05 10:56:57 -07:00
cluster.go Fixed loadbalancer in case of IPv6 addresses 2022-03-31 11:49:30 +02:00
encrypt.go [master] changing package to k3s-io (#4846) 2022-03-02 15:47:27 -08:00
etcd.go [master] changing package to k3s-io (#4846) 2022-03-02 15:47:27 -08:00
https.go Bugfix: do not break cert-manager when pprof is enabled (#6635) 2023-01-13 16:09:14 -08:00
managed.go Fix race condition in tunnel server startup 2023-04-28 11:24:34 -07:00
router.go Remove unnecessary copies of runtime struct 2022-02-28 12:05:16 -08:00
storage.go Lock bootstrap data with empty key to prevent conflicts 2023-04-05 10:56:57 -07:00