Taking first interface address in hostgw instead of the last one - required for kube-proxy in userspace #8
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.
NOTE: this pull request is for your gonetsh vendor package - I am not sure how currently the packages should be maintained, treat this pull request more like a "issue report and workaround"
When kubeproxy is running in userspace mode, it will attach multiple interfaces for services to cbr0 interface like below:
Current implementation of flannel hostgw backed for windows will result then in:
This is caused by the fact, that the last IP ("10.201.39.237") for cbr0 will be taken as main interface IP instead of "10.200.9.2".
The pull request fixes this issue by not overwriting IP, subnet and gateway if they are already resolved, there is a probably better way to do this using pure netsh commands, but I am not an expert in this manner.