-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update waitUntilCondition to use a watcher instead of polling. All wa…
…itUntil* methods should end up calling waitUntilCondition. Retry all exceptions except HTTP_GONE, with backoff
- Loading branch information
1 parent
c96b1db
commit 3342279
Showing
26 changed files
with
804 additions
and
351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...netes-client/src/main/java/io/fabric8/kubernetes/client/WaitRetryBackoffConfigurable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package io.fabric8.kubernetes.client; | ||
|
||
import java.util.concurrent.TimeUnit; | ||
|
||
public interface WaitRetryBackoffConfigurable<T> { | ||
|
||
/** | ||
* Configure the backoff strategy to use when waiting for conditions, in case the watcher encounters a retryable error. | ||
* @param initialBackoff the value for the initial backoff on first error | ||
* @param backoffUnit the TimeUnit for the initial backoff value | ||
* @param backoffMultiplier what to multiply the backoff by on each subsequent error | ||
* @return | ||
*/ | ||
T withWaitRetryBackoff(long initialBackoff, TimeUnit backoffUnit, double backoffMultiplier); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...es-client/src/main/java/io/fabric8/kubernetes/client/dsl/WatchingWaitableWithBackoff.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.fabric8.kubernetes.client.dsl; | ||
|
||
import io.fabric8.kubernetes.client.WaitRetryBackoffConfigurable; | ||
|
||
public interface WatchingWaitableWithBackoff<T, P> extends Waitable<T, P>, WaitRetryBackoffConfigurable<WatchingWaitableWithBackoff<T, P>> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.