-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Service Topology implementation for Kubernetes #72046
Service Topology implementation for Kubernetes #72046
Conversation
/assign @thockin @johnbelamaric @wojtek-t |
afce5bf
to
13c76b5
Compare
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.
Using new
as a variable name is the only blocker, lgtm otherwise
pkg/apis/core/types.go
Outdated
// If this field is specified and all entries have no backends that match | ||
// the topology of the client, the service has no backends for that client | ||
// and connections should fail. | ||
// The special value "*" may be used to mean "any node". This catch-all |
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.
btw, this is still unresolved, can we fix in follow-up PR?
pkg/proxy/iptables/proxier.go
Outdated
klog.Errorf("Received a watch event for a node %s that doesn't match the current node %v", node.Name, proxier.hostname) | ||
return | ||
} | ||
new := node.Labels |
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.
shouldn't use new
, since it's a go keyword, can we rename to newLabels
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.
Yes, will fix it.
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.
thanks
pkg/proxy/iptables/proxier.go
Outdated
return | ||
} | ||
new := node.Labels | ||
old := proxier.nodeLabels |
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.
oldLabels
pkg/proxy/iptables/proxier.go
Outdated
proxier.mu.Lock() | ||
proxier.nodeLabels = new | ||
proxier.mu.Unlock() | ||
if len(old) != len(new) || !reflect.DeepEqual(old, new) { |
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.
length is already considered from reflecy.DeepEqual?
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.
Yes, gonna remove length comparation.
pkg/proxy/ipvs/proxier.go
Outdated
klog.Errorf("Received a watch event for a node %s that doesn't match the current node %v", node.Name, proxier.hostname) | ||
return | ||
} | ||
new := node.Labels |
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.
newLabels
pkg/proxy/ipvs/proxier.go
Outdated
return | ||
} | ||
new := node.Labels | ||
old := proxier.nodeLabels |
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.
oldLabels
pkg/proxy/ipvs/proxier.go
Outdated
klog.Errorf("Received a watch event for a node %s that doesn't match the current node %v", node.Name, proxier.hostname) | ||
return | ||
} | ||
new := node.Labels |
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.
newLabels
pkg/proxy/ipvs/proxier.go
Outdated
return | ||
} | ||
new := node.Labels | ||
old := proxier.nodeLabels |
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.
oldLabels
* Implement Service Topology for ipvs and iptables proxier * Add test files * API validation
63a1a40
to
fce9324
Compare
/milestone v1.18 (code freeze v1.17) |
Can we request an exception to fit this into v1.17? @thockin @andrewsykim @johnbelamaric |
/milestone v1.17 I can lgtm by EOD PST if comments are addressed, otherwise we'll file an exception (we agreed to do this in today's SIG meeting) |
I see comments are addressed now, thanks @imroc /lgtm |
/retest |
@imroc looks like we need to update swagger docs and protobuf |
fce9324
to
31d623b
Compare
Yes, now it's updated and pushed. |
/lgtm |
/retest help wanted please. |
/test pull-kubernetes-e2e-gce-100-performance |
/retest |
@m1093782566: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
What type of PR is this?
/kind api-change
/kind feature
What this PR does / why we need it:
API&Implement for feature: topology-aware service routing
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Design document of this feature is kubernetes/enhancements#640
Does this PR introduce a user-facing change?: