Class DefaultControllerBuilder

java.lang.Object
io.kubernetes.client.extended.controller.builder.DefaultControllerBuilder

public class DefaultControllerBuilder extends Object
The type DefaultControllerBuilder is a fluent builder class for constructing a 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

      public DefaultControllerBuilder withName(String controllerName)
      Overrides name for the controller.
      Parameters:
      controllerName - the controller name
      Returns:
      the controller builder
    • withWorkQueue

      public DefaultControllerBuilder withWorkQueue(RateLimitingQueue<Request> workQueue)
      Overrides workQueue for the controller.
      Parameters:
      workQueue - the work queue
      Returns:
      the controller builder
    • withReadyFunc

      public DefaultControllerBuilder withReadyFunc(Supplier<Boolean> readyFunc)
      Add a ready-function to the pre-flight check of the controller.
      Parameters:
      readyFunc - the ready func
      Returns:
      the controller builder
    • withReadyTimeout

      public DefaultControllerBuilder withReadyTimeout(Duration readyTimeout)
    • withWorkerCount

      public DefaultControllerBuilder withWorkerCount(int workerCount)
      Overrides worker thread counts of the controller.
      Parameters:
      workerCount - the worker count
      Returns:
      the controller builder
    • withReconciler

      public DefaultControllerBuilder withReconciler(Reconciler reconciler)
      Sets reconciler of the controller.
      Parameters:
      reconciler - the reconciler
      Returns:
      the controller builder
    • build

      public Controller build() throws IllegalStateException
      Build the controller.
      Returns:
      the controller
      Throws:
      IllegalStateException - the illegal state exception