-
Notifications
You must be signed in to change notification settings - Fork 382
Update bind loop support for namespaced classes and plans #2159
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
if err != nil { | ||
return nil, err | ||
if instance.Spec.ClusterServiceClassSpecified() { | ||
|
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.
nit: what is with all this extra space in the new block?
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.
I can fix it if you want, it made it easier for me to read and see the if blocks especially when I was moving things around. But now that it's done I'd be happy to remove it if required.
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.
I did it in controller_binding.go as well. Let me know if you really want me to fix this nit or not.
pkg/controller/controller_binding.go
Outdated
@@ -25,6 +25,7 @@ import ( | |||
utilfeature "k8s.io/apiserver/pkg/util/feature" | |||
|
|||
"bytes" |
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.
bytes should go up by net and fmt
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.
Wow, not sure why goimports didn't move that for me. It's usually really good at taking of that. I'll fix that.
if instance.Spec.ClusterServiceClassSpecified() { | ||
if instance.Spec.ClusterServiceClassRef == nil || instance.Spec.ClusterServicePlanRef == nil { | ||
// retry later | ||
msg := fmt.Sprintf(`Binding cannot begin because ClusterServiceClass and ClusterServicePlan references for %s have not been resolved yet`, pretty.ServiceInstanceName(instance)) |
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.
pretty print the msg?
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.
@n3wscott I'm not quite sure what you mean by that? :) not trying to obtuse, but clearly there is a pretty printer used that I missed, is there a good example of it being used elsewhere?
* Added TestReconcileServiceBindingWithParametersNamespacedRefs
it was replaced by a newer one.
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.
LGTM
No description provided.