我有一个自定义观察者如下:
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 的 kube-proxy 还使用informers监听服务事件。是否总是保证在自定义观察者获得调用之前调用 kube-proxy 的处理程序?