Adding support for TopologyAwareHints to kube-proxy

This commit is contained in:
Rob Scott
2021-03-05 12:06:07 -08:00
parent 1dcf09c1bf
commit f07be06a19
12 changed files with 545 additions and 133 deletions

View File

@@ -37,6 +37,7 @@ import (
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/wait"
utilfeature "k8s.io/apiserver/pkg/util/feature"
"k8s.io/client-go/tools/record"
@@ -201,6 +202,11 @@ func (info *endpointsInfo) GetTopology() map[string]string {
return nil
}
// GetZoneHint returns the zone hint for the endpoint.
func (info *endpointsInfo) GetZoneHints() sets.String {
return sets.String{}
}
// IP returns just the IP part of the endpoint, it's a part of proxy.Endpoint interface.
func (info *endpointsInfo) IP() string {
return info.ip