flatcar-linux-update-operator
flatcar-linux-update-operator copied to clipboard
Add tests or use some library to perform node draining
Right now draining code https://github.com/flatcar-linux/flatcar-linux-update-operator/blob/90bccc05713bb0a000104e3fca3408be0de61f3b/pkg/k8sutil/drain.go#L20-L46 is not tested, which should be fixed. However, we might be able to import some k8s code which will do the draining for us.
Maybe that also helps somehow solving #58 ?
Likely https://pkg.go.dev/k8s.io/kubectl/pkg/drain#Helper.EvictPod could be used.