Skip to content

Commit

Permalink
Fix kube-proxy to watch services and endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtek-t committed May 2, 2017
1 parent 8f6df26 commit 5ee74d5
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions pkg/kubemark/hollow_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,18 @@ type HollowProxy struct {

type FakeProxyHandler struct{}

func (*FakeProxyHandler) OnServiceUpdate(services []*api.Service) {}
func (*FakeProxyHandler) OnServiceAdd(service *api.Service) {}
func (*FakeProxyHandler) OnServiceUpdate(oldService, service *api.Service) {}
func (*FakeProxyHandler) OnServiceDelete(service *api.Service) {}
func (*FakeProxyHandler) OnServiceSynced() {}
func (*FakeProxyHandler) OnEndpointsAdd(endpoints *api.Endpoints) {}
func (*FakeProxyHandler) OnEndpointsUpdate(oldEndpoints, endpoints *api.Endpoints) {}
func (*FakeProxyHandler) OnEndpointsDelete(endpoints *api.Endpoints) {}
func (*FakeProxyHandler) OnEndpointsSynced() {}

type FakeProxier struct{}

func (*FakeProxier) OnServiceUpdate(services []*api.Service) {}
func (*FakeProxier) Sync() {}
func (*FakeProxier) Sync() {}
func (*FakeProxier) SyncLoop() {
select {}
}
Expand All @@ -70,17 +72,19 @@ func NewHollowProxyOrDie(

return &HollowProxy{
ProxyServer: &proxyapp.ProxyServer{
Client: client,
EventClient: eventClient,
IptInterface: iptInterface,
Proxier: &FakeProxier{},
Broadcaster: broadcaster,
Recorder: recorder,
ProxyMode: "fake",
NodeRef: nodeRef,
OOMScoreAdj: util.Int32Ptr(0),
ResourceContainer: "",
ConfigSyncPeriod: 30 * time.Second,
Client: client,
EventClient: eventClient,
IptInterface: iptInterface,
Proxier: &FakeProxier{},
Broadcaster: broadcaster,
Recorder: recorder,
ProxyMode: "fake",
NodeRef: nodeRef,
OOMScoreAdj: util.Int32Ptr(0),
ResourceContainer: "",
ConfigSyncPeriod: 30 * time.Second,
ServiceEventHandler: &FakeProxyHandler{},
EndpointsEventHandler: &FakeProxyHandler{},
},
}
}
Expand Down

0 comments on commit 5ee74d5

Please sign in to comment.