-
Notifications
You must be signed in to change notification settings - Fork 382
Move serviceBroker references to clusterServiceBroker in controllers #1911
Changes from 10 commits
d9079e8
7a685d7
d6b60d6
4e5b28b
648ae00
9536ef4
d8eb2df
f91c5fe
1dd741a
da2d2dd
bb917d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,9 +38,9 @@ import ( | |
// be easily combined with a follow on specific message. | ||
const ( | ||
errorFetchingCatalogReason string = "ErrorFetchingCatalog" | ||
errorFetchingCatalogMessage string = "Error fetching catalog. " | ||
errorFetchingCatalogMessage string = "Error fetching catalog." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note the trailing spaces; those are intentional because these strings are use to construct error messages. Would you restore the trailing spaces? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 Didn't realize those were deliberate; that makes sense. |
||
errorSyncingCatalogReason string = "ErrorSyncingCatalog" | ||
errorSyncingCatalogMessage string = "Error syncing catalog from ServiceBroker. " | ||
errorSyncingCatalogMessage string = "Error syncing catalog from ServiceBroker." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/ServiceBroker/ClusterServiceBroker There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also I suspect we will have the same reasons/messages for namespaced service brokers, so we should probably prefix the variable names with |
||
|
||
errorListingClusterServiceClassesReason string = "ErrorListingServiceClasses" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably missed in #1910: should error reason and message have |
||
errorListingClusterServiceClassesMessage string = "Error listing service classes." | ||
|
@@ -61,7 +61,7 @@ const ( | |
errorReconciliationRetryTimeoutReason string = "ErrorReconciliationRetryTimeout" | ||
) | ||
|
||
func (c *controller) brokerAdd(obj interface{}) { | ||
func (c *controller) clusterServiceBrokerAdd(obj interface{}) { | ||
// DeletionHandlingMetaNamespaceKeyFunc returns a unique key for the resource and | ||
// handles the special case where the resource is of DeletedFinalStateUnknown type, which | ||
// acts a place holder for resources that have been deleted from storage but the watch event | ||
|
@@ -73,14 +73,14 @@ func (c *controller) brokerAdd(obj interface{}) { | |
glog.Errorf("Couldn't get key for object %+v: %v", obj, err) | ||
return | ||
} | ||
c.brokerQueue.Add(key) | ||
c.clusterServiceBrokerQueue.Add(key) | ||
} | ||
|
||
func (c *controller) brokerUpdate(oldObj, newObj interface{}) { | ||
c.brokerAdd(newObj) | ||
func (c *controller) clusterServiceBrokerUpdate(oldObj, newObj interface{}) { | ||
c.clusterServiceBrokerAdd(newObj) | ||
} | ||
|
||
func (c *controller) brokerDelete(obj interface{}) { | ||
func (c *controller) clusterServiceBrokerDelete(obj interface{}) { | ||
broker, ok := obj.(*v1beta1.ClusterServiceBroker) | ||
if broker == nil || !ok { | ||
return | ||
|
@@ -151,7 +151,7 @@ func shouldReconcileClusterServiceBroker(broker *v1beta1.ClusterServiceBroker, n | |
} | ||
|
||
func (c *controller) reconcileClusterServiceBrokerKey(key string) error { | ||
broker, err := c.brokerLister.Get(key) | ||
broker, err := c.clusterServiceBrokerLister.Get(key) | ||
pcb := pretty.NewContextBuilder(pretty.ClusterServiceBroker, "", key) | ||
if errors.IsNotFound(err) { | ||
glog.Info(pcb.Message("Not doing work because it has been deleted")) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now this doc should have the changes reverted and we'll be good to go.