Skip to content

Commit

Permalink
Fix Envoy service status watching
Browse files Browse the repository at this point in the history
We all missed in #2583 that not all informers handle Unstructured objects; wrap the service status informer in the dynamicHandler to ensure that no Unstructured objects make it through.

Service status watching was broken before this, as it didn't handle Unstructured.

Signed-off-by: Nick Young <[email protected]>
  • Loading branch information
Nick Young committed Jun 18, 2020
1 parent 5494036 commit c38d8e1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/contour/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,13 @@ func doServe(log logrus.FieldLogger, ctx *serveContext) error {
ServiceName: ctx.EnvoyServiceName,
LBStatus: lbsw.lbStatus,
}
dynamicServiceHandler := &k8s.DynamicClientHandler{
Next: ssw,
Converter: converter,
Logger: log.WithField("context", "dynamicHandler"),
}
factory := clients.NewInformerFactoryForNamespace(ctx.EnvoyServiceNamespace)
informerSyncList.InformOnResources(factory, ssw, k8s.ServicesResources()...)
informerSyncList.InformOnResources(factory, dynamicServiceHandler, k8s.ServicesResources()...)
g.Add(startInformer(factory, log.WithField("context", "serviceStatusLoadBalancerWatcher")))
log.WithField("envoy-service-name", ctx.EnvoyServiceName).
WithField("envoy-service-namespace", ctx.EnvoyServiceNamespace).
Expand Down

0 comments on commit c38d8e1

Please sign in to comment.