Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enqueue default backend for NEG processing #900

Merged
merged 1 commit into from
Oct 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/neg/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,16 @@ func (c *Controller) enqueueService(obj interface{}) {
}

func (c *Controller) enqueueIngressServices(ing *v1beta1.Ingress) {
// enqueue services referenced by ingress
keys := gatherIngressServiceKeys(ing)
for key := range keys {
c.enqueueService(cache.ExplicitKey(key))
}

// enqueue default backend service
if flags.F.EnableL7Ilb && ing.Spec.Backend == nil {
c.enqueueService(cache.ExplicitKey(c.defaultBackendService.ID.Service.String()))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we not have a unit test covering this functionality?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add unit test for these

}
}

// enqueueDestinationRule will enqueue the service used by obj.
Expand Down