I'm writing a custom controller for Kubernetes in Go with the help of client-go. It is based on the sample-controller and working great so far.
The SharedIndexInformer
has the option to periodically resync all objects. (Parameter resyncPeriod
is set to 30 seconds in the sample-controller.)
Is there a way to force a resync immediately?
The code which seems to handle the periodic resync seems to call store.Resync()
.
I've tried calling fooInformer.Informer().GetStore().Resync()
. The call succeeds, but the resync is not happening. What did I miss?
I'm using client-go
v0.17.2
and the server is EKS v1.14.9-eks-c0eccc
.