@@ -74,10 +74,10 @@ func (p *HybridProxier) OnServiceAdd(service *api.Service) {
74
74
// since this is an Add, we know the service isn't already in another
75
75
// proxy, so don't bother trying to remove like on an update
76
76
if isUsingUserspace , ok := p .usingUserspace [svcName ]; ok && isUsingUserspace {
77
- glog .V (6 ).Infof ("hybrid proxy: add svc %s in unidling proxy" , service .Name )
77
+ glog .V (6 ).Infof ("hybrid proxy: add svc %s/%s in unidling proxy" , service . Namespace , service .Name )
78
78
p .unidlingServiceHandler .OnServiceAdd (service )
79
79
} else {
80
- glog .V (6 ).Infof ("hybrid proxy: add svc %s in main proxy" , service .Name )
80
+ glog .V (6 ).Infof ("hybrid proxy: add svc %s/%s in main proxy" , service . Namespace , service .Name )
81
81
p .mainServicesHandler .OnServiceAdd (service )
82
82
}
83
83
}
@@ -94,10 +94,10 @@ func (p *HybridProxier) OnServiceUpdate(oldService, service *api.Service) {
94
94
// NB: usingUserspace can only change in the endpoints handler,
95
95
// so that should deal with calling OnServiceDelete on switches
96
96
if isUsingUserspace , ok := p .usingUserspace [svcName ]; ok && isUsingUserspace {
97
- glog .V (6 ).Infof ("hybrid proxy: update svc %s in unidling proxy" , service .Name )
97
+ glog .V (6 ).Infof ("hybrid proxy: update svc %s/%s in unidling proxy" , service . Namespace , service .Name )
98
98
p .unidlingServiceHandler .OnServiceUpdate (oldService , service )
99
99
} else {
100
- glog .V (6 ).Infof ("hybrid proxy: update svc %s in main proxy" , service .Name )
100
+ glog .V (6 ).Infof ("hybrid proxy: update svc %s/%s in main proxy" , service . Namespace , service .Name )
101
101
p .mainServicesHandler .OnServiceUpdate (oldService , service )
102
102
}
103
103
}
@@ -112,10 +112,10 @@ func (p *HybridProxier) OnServiceDelete(service *api.Service) {
112
112
defer p .usingUserspaceLock .Unlock ()
113
113
114
114
if isUsingUserspace , ok := p .usingUserspace [svcName ]; ok && isUsingUserspace {
115
- glog .V (6 ).Infof ("hybrid proxy: del svc %s in unidling proxy" , service .Name )
115
+ glog .V (6 ).Infof ("hybrid proxy: del svc %s/%s in unidling proxy" , service . Namespace , service .Name )
116
116
p .unidlingServiceHandler .OnServiceDelete (service )
117
117
} else {
118
- glog .V (6 ).Infof ("hybrid proxy: del svc %s in main proxy" , service .Name )
118
+ glog .V (6 ).Infof ("hybrid proxy: del svc %s/%s in main proxy" , service . Namespace , service .Name )
119
119
p .mainServicesHandler .OnServiceDelete (service )
120
120
}
121
121
}
@@ -149,16 +149,16 @@ func (p *HybridProxier) shouldEndpointsUseUserspace(endpoints *api.Endpoints) bo
149
149
func (p * HybridProxier ) switchService (name types.NamespacedName ) {
150
150
svc , err := p .serviceLister .Services (name .Namespace ).Get (name .Name )
151
151
if err != nil {
152
- utilruntime .HandleError (fmt .Errorf ("Error while getting service %s from cache: %v" , name .String (), err ))
152
+ utilruntime .HandleError (fmt .Errorf ("Error while getting service %s/%s from cache: %v" , name . Namespace , name .String (), err ))
153
153
return
154
154
}
155
155
156
156
if p .usingUserspace [name ] {
157
- glog .V (6 ).Infof ("hybrid proxy: switching svc %s to unidling proxy" , svc .Name )
157
+ glog .V (6 ).Infof ("hybrid proxy: switching svc %s/%s to unidling proxy" , svc . Namespace , svc .Name )
158
158
p .unidlingServiceHandler .OnServiceAdd (svc )
159
159
p .mainServicesHandler .OnServiceDelete (svc )
160
160
} else {
161
- glog .V (6 ).Infof ("hybrid proxy: switching svc %s to main proxy" , svc .Name )
161
+ glog .V (6 ).Infof ("hybrid proxy: switching svc %s/%s to main proxy" , svc . Namespace , svc .Name )
162
162
p .mainServicesHandler .OnServiceAdd (svc )
163
163
p .unidlingServiceHandler .OnServiceDelete (svc )
164
164
}
@@ -167,7 +167,7 @@ func (p *HybridProxier) switchService(name types.NamespacedName) {
167
167
func (p * HybridProxier ) OnEndpointsAdd (endpoints * api.Endpoints ) {
168
168
// we track all endpoints in the unidling endpoints handler so that we can succesfully
169
169
// detect when a service become unidling
170
- glog .V (6 ).Infof ("hybrid proxy: (always) add ep %s in unidling proxy" , endpoints .Name )
170
+ glog .V (6 ).Infof ("hybrid proxy: (always) add ep %s/%s in unidling proxy" , endpoints . Namespace , endpoints .Name )
171
171
p .unidlingEndpointsHandler .OnEndpointsAdd (endpoints )
172
172
173
173
p .usingUserspaceLock .Lock ()
@@ -182,7 +182,7 @@ func (p *HybridProxier) OnEndpointsAdd(endpoints *api.Endpoints) {
182
182
p .usingUserspace [svcName ] = p .shouldEndpointsUseUserspace (endpoints )
183
183
184
184
if ! p .usingUserspace [svcName ] {
185
- glog .V (6 ).Infof ("hybrid proxy: add ep %s in main proxy" , endpoints .Name )
185
+ glog .V (6 ).Infof ("hybrid proxy: add ep %s/%s in main proxy" , endpoints . Namespace , endpoints .Name )
186
186
p .mainEndpointsHandler .OnEndpointsAdd (endpoints )
187
187
}
188
188
@@ -196,7 +196,7 @@ func (p *HybridProxier) OnEndpointsAdd(endpoints *api.Endpoints) {
196
196
func (p * HybridProxier ) OnEndpointsUpdate (oldEndpoints , endpoints * api.Endpoints ) {
197
197
// we track all endpoints in the unidling endpoints handler so that we can succesfully
198
198
// detect when a service become unidling
199
- glog .V (6 ).Infof ("hybrid proxy: (always) update ep %s in unidling proxy" , endpoints .Name )
199
+ glog .V (6 ).Infof ("hybrid proxy: (always) update ep %s/%s in unidling proxy" , endpoints . Namespace , endpoints .Name )
200
200
p .unidlingEndpointsHandler .OnEndpointsUpdate (oldEndpoints , endpoints )
201
201
202
202
p .usingUserspaceLock .Lock ()
@@ -218,16 +218,16 @@ func (p *HybridProxier) OnEndpointsUpdate(oldEndpoints, endpoints *api.Endpoints
218
218
isSwitch := wasUsingUserspace != p .usingUserspace [svcName ]
219
219
220
220
if ! isSwitch && ! p .usingUserspace [svcName ] {
221
- glog .V (6 ).Infof ("hybrid proxy: update ep %s in main proxy" , endpoints .Name )
221
+ glog .V (6 ).Infof ("hybrid proxy: update ep %s/%s in main proxy" , endpoints . Namespace , endpoints .Name )
222
222
p .mainEndpointsHandler .OnEndpointsUpdate (oldEndpoints , endpoints )
223
223
return
224
224
}
225
225
226
226
if p .usingUserspace [svcName ] {
227
- glog .V (6 ).Infof ("hybrid proxy: del ep %s in main proxy" , endpoints .Name )
227
+ glog .V (6 ).Infof ("hybrid proxy: del ep %s/%s in main proxy" , endpoints . Namespace , endpoints .Name )
228
228
p .mainEndpointsHandler .OnEndpointsDelete (oldEndpoints )
229
229
} else {
230
- glog .V (6 ).Infof ("hybrid proxy: add ep %s in main proxy" , endpoints .Name )
230
+ glog .V (6 ).Infof ("hybrid proxy: add ep %s/%s in main proxy" , endpoints . Namespace , endpoints .Name )
231
231
p .mainEndpointsHandler .OnEndpointsAdd (endpoints )
232
232
}
233
233
@@ -237,7 +237,7 @@ func (p *HybridProxier) OnEndpointsUpdate(oldEndpoints, endpoints *api.Endpoints
237
237
func (p * HybridProxier ) OnEndpointsDelete (endpoints * api.Endpoints ) {
238
238
// we track all endpoints in the unidling endpoints handler so that we can succesfully
239
239
// detect when a service become unidling
240
- glog .V (6 ).Infof ("hybrid proxy: (always) del ep %s in unidling proxy" , endpoints .Name )
240
+ glog .V (6 ).Infof ("hybrid proxy: (always) del ep %s/%s in unidling proxy" , endpoints . Namespace , endpoints .Name )
241
241
p .unidlingEndpointsHandler .OnEndpointsDelete (endpoints )
242
242
243
243
p .usingUserspaceLock .Lock ()
@@ -256,7 +256,7 @@ func (p *HybridProxier) OnEndpointsDelete(endpoints *api.Endpoints) {
256
256
}
257
257
258
258
if ! usingUserspace {
259
- glog .V (6 ).Infof ("hybrid proxy: del ep %s in main proxy" , endpoints .Name )
259
+ glog .V (6 ).Infof ("hybrid proxy: del ep %s/%s in main proxy" , endpoints . Namespace , endpoints .Name )
260
260
p .mainEndpointsHandler .OnEndpointsDelete (endpoints )
261
261
}
262
262
0 commit comments