Class DefaultControllerBuilder
java.lang.Object
io.kubernetes.client.extended.controller.builder.DefaultControllerBuilder
The type DefaultControllerBuilder is a fluent builder class for constructing a controller.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the controller.<ApiType extends io.kubernetes.client.common.KubernetesObject>
DefaultControllerBuilderwatch
(Function<WorkQueue<Request>, ControllerWatch<ApiType>> controllerWatchGetter) Starts building watches over resource.Overrides name for the controller.withReadyFunc
(Supplier<Boolean> readyFunc) Add a ready-function to the pre-flight check of the controller.withReadyTimeout
(Duration readyTimeout) withReconciler
(Reconciler reconciler) Sets reconciler of the controller.withWorkerCount
(int workerCount) Overrides worker thread counts of the controller.withWorkQueue
(RateLimitingQueue<Request> workQueue) Overrides workQueue for the controller.
-
Method Details
-
watch
public <ApiType extends io.kubernetes.client.common.KubernetesObject> DefaultControllerBuilder watch(Function<WorkQueue<Request>, ControllerWatch<ApiType>> controllerWatchGetter) Starts building watches over resource.- Type Parameters:
ApiType
- the type parameter for the singular response- Parameters:
controllerWatchGetter
- the controller watch getter- Returns:
- the controller builder . controller watch builder
-
withName
Overrides name for the controller.- Parameters:
controllerName
- the controller name- Returns:
- the controller builder
-
withWorkQueue
Overrides workQueue for the controller.- Parameters:
workQueue
- the work queue- Returns:
- the controller builder
-
withReadyFunc
Add a ready-function to the pre-flight check of the controller.- Parameters:
readyFunc
- the ready func- Returns:
- the controller builder
-
withReadyTimeout
-
withWorkerCount
Overrides worker thread counts of the controller.- Parameters:
workerCount
- the worker count- Returns:
- the controller builder
-
withReconciler
Sets reconciler of the controller.- Parameters:
reconciler
- the reconciler- Returns:
- the controller builder
-
build
Build the controller.- Returns:
- the controller
- Throws:
IllegalStateException
- the illegal state exception
-