proxy: consolidate ServicesHandler/EndpointsHandler into ProxyProvider

Proxies should be able to cleanly figure out when endpoints have been synced,
so make all ProxyProviders also implement EndpointsHandler and pass those
through to loadbalancers when required.
This commit is contained in:
Dan Williams
2018-12-04 23:35:34 -06:00
parent 92a2076149
commit 4b07f80d20
13 changed files with 80 additions and 81 deletions

View File

@@ -19,6 +19,7 @@ package winuserspace
import (
"k8s.io/api/core/v1"
"k8s.io/kubernetes/pkg/proxy"
proxyconfig "k8s.io/kubernetes/pkg/proxy/config"
"net"
)
@@ -30,4 +31,6 @@ type LoadBalancer interface {
NewService(service proxy.ServicePortName, sessionAffinityType v1.ServiceAffinity, stickyMaxAgeMinutes int) error
DeleteService(service proxy.ServicePortName)
CleanupStaleStickySessions(service proxy.ServicePortName)
proxyconfig.EndpointsHandler
}