@@ -249,8 +249,14 @@ func worker(queue workqueue.RateLimitingInterface, resourceType string, maxRetri
249
249
func (c * controller ) getClusterServiceClassPlanAndClusterServiceBroker (instance * v1beta1.ServiceInstance ) (* v1beta1.ClusterServiceClass , * v1beta1.ClusterServicePlan , string , osb.Client , error ) {
250
250
serviceClass , err := c .serviceClassLister .Get (instance .Spec .ClusterServiceClassRef .Name )
251
251
if err != nil {
252
- s := fmt .Sprintf ("ServiceInstance \" %s/%s\" references a non-existent ClusterServiceClass %q : K8S Name: %q" , instance .Namespace , instance .Name , instance .Spec .ExternalClusterServiceClassName , instance .Spec .ClusterServiceClassName )
253
- glog .Info (s )
252
+ s := fmt .Sprintf (
253
+ "References a non-existent ClusterServiceClass (K8S: %q ExternalName: %q)" ,
254
+ instance .Spec .ClusterServiceClassRef .Name , instance .Spec .ExternalClusterServiceClassName ,
255
+ )
256
+ glog .Infof (
257
+ `ServiceInstance "%v/%v": %s` ,
258
+ instance .Namespace , instance .Name , s ,
259
+ )
254
260
c .updateServiceInstanceCondition (
255
261
instance ,
256
262
v1beta1 .ServiceInstanceConditionReady ,
@@ -264,8 +270,14 @@ func (c *controller) getClusterServiceClassPlanAndClusterServiceBroker(instance
264
270
265
271
servicePlan , err := c .servicePlanLister .Get (instance .Spec .ClusterServicePlanRef .Name )
266
272
if nil != err {
267
- s := fmt .Sprintf (`ServiceInstance "%v/%v": references a non-existent ClusterServicePlan %q : K8S Name: %q on ClusterServiceClass %q` , instance .Namespace , instance .Name , instance .Spec .ExternalClusterServicePlanName , instance .Spec .ClusterServicePlanName , serviceClass .Spec .ExternalName )
268
- glog .Warning (s )
273
+ s := fmt .Sprintf (
274
+ "References a non-existent ClusterServicePlan %q on ClusterServiceClass (K8S: %q ExternalName: %q)" ,
275
+ instance .Spec .ExternalClusterServicePlanName , serviceClass .Name , serviceClass .Spec .ExternalName ,
276
+ )
277
+ glog .Warningf (
278
+ `ServiceInstance "%s/%s": %s` ,
279
+ instance .Namespace , instance .Name , s ,
280
+ )
269
281
c .updateServiceInstanceCondition (
270
282
instance ,
271
283
v1beta1 .ServiceInstanceConditionReady ,
@@ -279,8 +291,11 @@ func (c *controller) getClusterServiceClassPlanAndClusterServiceBroker(instance
279
291
280
292
broker , err := c .brokerLister .Get (serviceClass .Spec .ClusterServiceBrokerName )
281
293
if err != nil {
282
- s := fmt .Sprintf (`ServiceInstance "%v/%v": references a non-existent broker %q` , instance .Namespace , instance .Name , serviceClass .Spec .ClusterServiceBrokerName )
283
- glog .Warning (s )
294
+ s := fmt .Sprintf ("References a non-existent broker %q" , serviceClass .Spec .ClusterServiceBrokerName )
295
+ glog .Warningf (
296
+ `ServiceInstance "%s/%s": %s` ,
297
+ instance .Namespace , instance .Name , s ,
298
+ )
284
299
c .updateServiceInstanceCondition (
285
300
instance ,
286
301
v1beta1 .ServiceInstanceConditionReady ,
@@ -295,7 +310,10 @@ func (c *controller) getClusterServiceClassPlanAndClusterServiceBroker(instance
295
310
authConfig , err := getAuthCredentialsFromClusterServiceBroker (c .kubeClient , broker )
296
311
if err != nil {
297
312
s := fmt .Sprintf ("Error getting broker auth credentials for broker %q: %s" , broker .Name , err )
298
- glog .Info (s )
313
+ glog .Infof (
314
+ `ServiceInstance "%v/%v": %s` ,
315
+ instance .Namespace , instance .Name , s ,
316
+ )
299
317
c .updateServiceInstanceCondition (
300
318
instance ,
301
319
v1beta1 .ServiceInstanceConditionReady ,
@@ -325,8 +343,14 @@ func (c *controller) getClusterServiceClassPlanAndClusterServiceBroker(instance
325
343
func (c * controller ) getClusterServiceClassPlanAndClusterServiceBrokerForServiceBinding (instance * v1beta1.ServiceInstance , binding * v1beta1.ServiceBinding ) (* v1beta1.ClusterServiceClass , * v1beta1.ClusterServicePlan , string , osb.Client , error ) {
326
344
serviceClass , err := c .serviceClassLister .Get (instance .Spec .ClusterServiceClassRef .Name )
327
345
if err != nil {
328
- s := fmt .Sprintf ("ServiceBinding \" %s/%s\" references a non-existent ClusterServiceClass %q : K8S name %q" , binding .Namespace , binding .Name , instance .Spec .ExternalClusterServiceClassName , instance .Spec .ClusterServiceClassName )
329
- glog .Warning (s )
346
+ s := fmt .Sprintf (
347
+ "References a non-existent ClusterServiceClass (K8S: %q ExternalName: %q)" ,
348
+ instance .Spec .ClusterServiceClassRef .Name , instance .Spec .ExternalClusterServiceClassName ,
349
+ )
350
+ glog .Warningf (
351
+ `ServiceBinding "%s/%s": %s` ,
352
+ instance .Namespace , instance .Name , s ,
353
+ )
330
354
c .updateServiceBindingCondition (
331
355
binding ,
332
356
v1beta1 .ServiceBindingConditionReady ,
@@ -340,8 +364,14 @@ func (c *controller) getClusterServiceClassPlanAndClusterServiceBrokerForService
340
364
341
365
servicePlan , err := c .servicePlanLister .Get (instance .Spec .ClusterServicePlanRef .Name )
342
366
if nil != err {
343
- s := fmt .Sprintf ("ServiceInstance \" %s/%s\" references a non-existent ClusterServicePlan %q : K8S name %q on ClusterServiceClass %q" , instance .Namespace , instance .Name , instance .Spec .ExternalClusterServicePlanName , instance .Spec .ClusterServicePlanName , serviceClass .Spec .ExternalName )
344
- glog .Warning (s )
367
+ s := fmt .Sprintf (
368
+ "References a non-existent ClusterServicePlan %q on ClusterServiceClass (K8S: %q ExternalName: %q)" ,
369
+ instance .Spec .ExternalClusterServicePlanName , serviceClass .Name , serviceClass .Spec .ExternalName ,
370
+ )
371
+ glog .Warningf (
372
+ `ServiceBinding "%s/%s": %s` ,
373
+ instance .Namespace , instance .Name , s ,
374
+ )
345
375
c .updateServiceBindingCondition (
346
376
binding ,
347
377
v1beta1 .ServiceBindingConditionReady ,
@@ -355,8 +385,11 @@ func (c *controller) getClusterServiceClassPlanAndClusterServiceBrokerForService
355
385
356
386
broker , err := c .brokerLister .Get (serviceClass .Spec .ClusterServiceBrokerName )
357
387
if err != nil {
358
- s := fmt .Sprintf ("ServiceBinding \" %s/%s\" references a non-existent ClusterServiceBroker %q" , binding .Namespace , binding .Name , serviceClass .Spec .ClusterServiceBrokerName )
359
- glog .Warning (s )
388
+ s := fmt .Sprintf ("References a non-existent ClusterServiceBroker %q" , serviceClass .Spec .ClusterServiceBrokerName )
389
+ glog .Warningf (
390
+ `ServiceBinding "%s/%s": %s` ,
391
+ instance .Namespace , instance .Name , s ,
392
+ )
360
393
c .updateServiceBindingCondition (
361
394
binding ,
362
395
v1beta1 .ServiceBindingConditionReady ,
@@ -371,7 +404,10 @@ func (c *controller) getClusterServiceClassPlanAndClusterServiceBrokerForService
371
404
authConfig , err := getAuthCredentialsFromClusterServiceBroker (c .kubeClient , broker )
372
405
if err != nil {
373
406
s := fmt .Sprintf ("Error getting broker auth credentials for broker %q: %s" , broker .Name , err )
374
- glog .Warning (s )
407
+ glog .Warningf (
408
+ `ServiceBinding "%s/%s": %s` ,
409
+ instance .Namespace , instance .Name , s ,
410
+ )
375
411
c .updateServiceBindingCondition (
376
412
binding ,
377
413
v1beta1 .ServiceBindingConditionReady ,
@@ -518,7 +554,7 @@ func convertCatalog(in *osb.CatalogResponse) ([]*v1beta1.ClusterServiceClass, []
518
554
519
555
func convertClusterServicePlans (plans []osb.Plan , serviceClassID string ) ([]* v1beta1.ClusterServicePlan , error ) {
520
556
if 0 == len (plans ) {
521
- return nil , fmt .Errorf ("ClusterServiceClass %q must have at least one plan" , serviceClassID )
557
+ return nil , fmt .Errorf ("ClusterServiceClass (K8S: %q) must have at least one plan" , serviceClassID )
522
558
}
523
559
servicePlans := make ([]* v1beta1.ClusterServicePlan , len (plans ))
524
560
for i , plan := range plans {
0 commit comments