Skip to content

Conversation

@andrewsykim
Copy link
Contributor

There's an edge case for services using externalTrafficPolicy: Local where the export policies aren't updated for up to 5m (default routes sync period) because the first Service update event fails because the corresponding endpoint was not created. This is a race condition between kube-router & the apiserver.

E0808 18:11:30.708175       1 ecmp_vip.go:92] error getting routes for service: nginx, err: endpoint resource doesn't exist for service: "nginx"

^ that log message is from here right before the call to nrc.addExportPolicies().

This PR adds a OnEndpointsAdd event handler to call addExportPolicies in addition to OnEndpointsUpdate when endpoint resources are created.

@andrewsykim andrewsykim force-pushed the export-policies-on-endpoint-add branch from 1d13e81 to 228d1f7 Compare August 9, 2018 00:18
@andrewsykim andrewsykim force-pushed the export-policies-on-endpoint-add branch from 228d1f7 to 029a4b0 Compare August 9, 2018 00:20
@murali-reddy
Copy link
Member

LGTM

@murali-reddy murali-reddy merged commit 94e163b into cloudnativelabs:master Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants