Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
f4b1936 removed proxy pod filter on feedback controller, which crashed the controller manager if normal pods were scheduled on nodes whose names were than 10 characters long, and added finalizers to normal pods (manual cleanup necessary!)

Signed-off-by: adrienjt <[email protected]>
  • Loading branch information
adrienjt committed Jun 23, 2020
1 parent d2aa4c1 commit 157937d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/controllers/feedback/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,14 @@ func NewController(
getPod := func(namespace, name string) (metav1.Object, error) { return r.podsLister.Pods(namespace).Get(name) }
c := controller.New("feedback", r, informersSynced...)

podInformer.Informer().AddEventHandler(controller.HandleAddUpdateWith(c.EnqueueObject))
enqueueProxyPod := func(obj interface{}) {
pod := obj.(*corev1.Pod)
if proxypod.IsProxy(pod) {
c.EnqueueObject(obj)
}
}

podInformer.Informer().AddEventHandler(controller.HandleAddUpdateWith(enqueueProxyPod))
for _, informer := range podChaperonInformers {
informer.Informer().AddEventHandler(controller.HandleAllWith(c.EnqueueRemoteController("Pod", getPod)))
}
Expand Down

0 comments on commit 157937d

Please sign in to comment.