-
Notifications
You must be signed in to change notification settings - Fork 385
Add CRD waiter for migration job and webhook server #2719
Add CRD waiter for migration job and webhook server #2719
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mszostok 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 |
3b97596
to
68800b2
Compare
/hold |
5ca08e0
to
13da337
Compare
It may take some time before Catalog CRDs registration shows up in main API Server. Because of that the CRD waiter is executed for each binary. Additionally, we added retries when restoring Service Catalog resources during the migration process.
13da337
to
c926838
Compare
@jberkhahn PTAL /hold cancel |
// RetryOnError allows the caller to retry fn in case the error returned by fn is retriable | ||
// according to the provided function. backoff defines the maximum retries and the wait | ||
// interval between two retries. | ||
func RetryOnError(backoff wait.Backoff, fn func() error) error { |
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 could have sworn we had a util function for this somewhere, but I can't seem to find it
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.
tomorrow, I will double recheck that. Basically, this func was inspired by the client-go retry policy but maybe it is already somewhere in our code.
btw. thanks for the review:)
/lgtm |
Description
It may take some time before Catalog CRDs registration shows up in main API Server.
Because of that the CRD waiter is executed for each binary. Additionally, we added
retries when restoring Service Catalog resources during the migration process.
See discussion in this thread for more info: https://kubernetes.slack.com/archives/C232SF3TK/p1570107013007500
Related issue: