0

I have a custom watcher as follows:

watchlist := cache.NewListWatchFromClient(client.Core().RESTClient(), "configmaps", KubeSystemNameSpace, fields.SelectorFromSet(fields.Set{"metadata.name": "test-map"}))
    resyncPeriod := 30 * time.Minute
//Setup an informer to call functions when the watchlist changes
_, controller = cache.NewInformer(
    watchlist,
    &v1.ConfigMap{},
    resyncPeriod,
    cache.ResourceEventHandlerFuncs{
        UpdateFunc: configMapUpdated,
    },
)

Kubernetes's kube-proxy also listens for service events using informers. Is it always guaranteed that kube-proxy's handler's are called before the custom watcher gets the call?

Pradeep
  • 1,198
  • 3
  • 12
  • 22

1 Answers1

1

Is it always guaranteed that kube-proxy's handler's are called before the custom watcher gets the call?

No, both kube-proxy and the custom watcher are treated as normal API clients, and there is no "happens before" guarantee as to which receives the service event first.

Jordan Liggitt
  • 16,933
  • 2
  • 56
  • 44