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
Add "local-with-fallback" externalTrafficPolicy hack #749
Add "local-with-fallback" externalTrafficPolicy hack #749
Conversation
@danwinship: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
how do you do to run the unit tests in proxier_test.go? EDIT |
} | ||
if hasLocalEndpoints { | ||
klog.V(4).Infof("Found %d local endpoint(s) for service %q; preferring the local endpoint and ignoring %d other endpoint(s)", len(localEndpoints), svcNameString, len(allEndpoints) - len(localEndpoints)) | ||
readyEndpoints = localEndpoints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the future us, this is "InternalTrafficPolicy: preferLocal" , right?
LGTM |
@danwinship: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
…olicy If a service has a "traffic-policy.network.alpha.openshift.io/local-with-fallback" annotation, then only treat it as "externalTrafficPolicy: Local" when there are actually running local pods. That is, if we receive traffic for such a service after the last local pod terminates, then forward it to a remote pod rather than dropping it.
@danwinship: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
5 similar comments
@danwinship: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
@danwinship: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
@danwinship: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
@danwinship: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
@danwinship: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
@danwinship: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
1 similar comment
@danwinship: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
} | ||
|
||
const localWithFallbackAnnotation = "traffic-policy.network.alpha.openshift.io/local-with-fallback" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is going to be an "official" annotation, service.kubernetes.io/topology-aware-routing
https://github.com/kubernetes/enhancements/tree/master/keps/sig-network/2433-topology-aware-hints#configuration
do we want to make it more official?
service.kubernetes.io/topology-aware-routing = local-with-fallback
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aojea, danwinship The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Also, the existing hack for DNS local pods doesn't actually work because it was modifyingallEndpoints
after the rest of the code had already ditchedallEndpoints
in favor ofreadyEndpoints
./cc @Miciah @dcbw @aojea @smarterclayton