#1920·flannel

Use apimachinery/pkg/util/wait to implement timeouts

Author: thomasferrandizCreated Mar 20, 2024Updated Oct 10, 2024
Labelspinned

We should stop using infinite loops for long operations like iptables-restore.

Possible Solution

migrate to https://pkg.go.dev/k8s.io/apimachinery/pkg/util/wait with a defined timeout where the process crashes after a while if something is not working as expected. Otherwise, it is hard to detect that things are not working well

Note: we need to wait for k8s 1.26 to be deprecated then update k8s deps to 1.27 before doing this since we need newer APIs introduced in 1.27.