Kubernetes: cleanup channel handling#932
Merged
vdemeester merged 2 commits intotraefik:masterfrom Dec 8, 2016
yvespp:master
Merged
Kubernetes: cleanup channel handling#932vdemeester merged 2 commits intotraefik:masterfrom yvespp:master
vdemeester merged 2 commits intotraefik:masterfrom
yvespp:master
Conversation
Contributor
|
Hah, I'd started to work on a similar idea for cleaning up the channels, right down to This looks great, I'll close my PR. |
Contributor
Author
|
Feel free to improve it! :-) Maybe there is a nicer way to check for |
Contributor
Author
|
@emilevauge can you have a look at this? |
|
I just deployed this PR to our cluster and it does fix the issue! Thanks a lot! @yvespp |
Contributor
Author
|
@philk actually fixed it! 😃 |
|
Well, thanks to @philk! |
Contributor
|
Team effort 😉 |
Member
|
@yvespp Could you rebase please? |
On a reasonably sized cluster: 63 nodes 87 services 90 endpoints The initialization of the k8s provider would hang. I tracked this down to the ResourceEventHandlerFuncs. Once you reach the channel buffer size (10) the k8s Informer gets stuck. You can't read or write messages to the channel anymore. I think this is probably a lock issue somewhere in k8s but the more reasonable solution for the traefik usecase is to just drop events when the queue is full since we only use the events for signalling, not their content, thus dropping an event doesn't matter.
Only use one channel for all watches Re-use stop channel from the provider Skip events that have already been handled by the provider, builds on 007f8cc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull includes #929 and cleans up the channel handling of the Kubernetes Provider: